diff options
author | Richard Hughes <richard@hughsie.com> | 2008-07-19 09:00:24 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2008-07-19 09:00:24 +0100 |
commit | dbf3888ce4b226775fd3d777cd97d8977a32601b (patch) | |
tree | 0fde134b2b5710ef790620b140caadd7f3e53690 | |
parent | 8edaa12993aefdf44129b45f8fbfec0bc2a5140d (diff) |
rename some of the PolicyKit actions on advice of David Zeuthen
-rw-r--r-- | policy/org.freedesktop.packagekit.policy.in | 61 | ||||
-rw-r--r-- | src/pk-security-polkit.c | 38 |
2 files changed, 38 insertions, 61 deletions
diff --git a/policy/org.freedesktop.packagekit.policy.in b/policy/org.freedesktop.packagekit.policy.in index 4c4607d3d..883c67039 100644 --- a/policy/org.freedesktop.packagekit.policy.in +++ b/policy/org.freedesktop.packagekit.policy.in @@ -15,5 +15,5 @@ - <action id="org.freedesktop.packagekit.install"> - <_description>Install package</_description> - <_message>Authentication is required to install a package</_message> + <action id="org.freedesktop.packagekit.package-install"> + <_description>Install local file</_description> + <_message>Authentication is required to install a signed package</_message> <icon_name>pk-package-add</icon_name> @@ -26,5 +26,5 @@ - <action id="org.freedesktop.packagekit.localinstall-untrusted"> + <action id="org.freedesktop.packagekit.package-install-untrusted"> <_description>Install untrusted local file</_description> - <_message>Further authentication is required to install an untrusted local file</_message> + <_message>Authentication is required to install an untrusted package</_message> <icon_name>pk-package-add</icon_name> @@ -37,16 +37,6 @@ - <action id="org.freedesktop.packagekit.localinstall-trusted"> - <_description>Install local file</_description> - <_message>Authentication is required to install a local file</_message> - <icon_name>pk-package-add</icon_name> - <vendor_url>http://www.packagekit.org/pk-reference.html#methods-install-file</vendor_url> - <defaults> - <allow_inactive>no</allow_inactive> - <allow_active>auth_admin_keep_always</allow_active> - </defaults> - </action> - <action id="org.freedesktop.packagekit.install-signature"> - <_description>Install security signature</_description> - <_message>Authentication is required to install a security signature</_message> + <action id="org.freedesktop.packagekit.system-trust-signing-key"> + <_description>Trust a key used for signing packages</_description> + <_message>Authentication is required to consider a key used for signing packages as trusted</_message> <icon_name>pk-package-add</icon_name> @@ -59,3 +49,3 @@ - <action id="org.freedesktop.packagekit.accept-eula"> + <action id="org.freedesktop.packagekit.package-eula-accept"> <_description>Accept EULA</_description> @@ -66,14 +56,3 @@ <allow_inactive>no</allow_inactive> - <allow_active>auth_admin_keep_always</allow_active> - </defaults> - </action> - - <action id="org.freedesktop.packagekit.update-package"> - <_description>Update package</_description> - <_message>Authentication is required to update packages</_message> - <icon_name>pk-package-update</icon_name> - <vendor_url>http://www.packagekit.org/pk-reference.html#methods-update</vendor_url> - <defaults> - <allow_inactive>no</allow_inactive> - <allow_active>auth_admin_keep_always</allow_active> + <allow_active>yes</allow_active> </defaults> @@ -81,3 +60,3 @@ - <action id="org.freedesktop.packagekit.remove"> + <action id="org.freedesktop.packagekit.package-remove"> <_description>Remove package</_description> @@ -92,5 +71,5 @@ - <action id="org.freedesktop.packagekit.update-system"> - <_description>Update all packages</_description> - <_message>Authentication is required to update all packages</_message> + <action id="org.freedesktop.packagekit.system-update"> + <_description>Update packages</_description> + <_message>Authentication is required to update packages</_message> <icon_name>pk-package-update</icon_name> @@ -103,3 +82,3 @@ - <action id="org.freedesktop.packagekit.rollback"> + <action id="org.freedesktop.packagekit.system-rollback"> <_description>Rollback to a previous transaction</_description> @@ -114,3 +93,3 @@ - <action id="org.freedesktop.packagekit.repo-change"> + <action id="org.freedesktop.packagekit.systems-sources-configure"> <_description>Change software source parameters</_description> @@ -125,5 +104,5 @@ - <action id="org.freedesktop.packagekit.refresh-cache"> - <_description>Refresh package lists</_description> - <_message>Authentication is required to refresh the package lists</_message> + <action id="org.freedesktop.packagekit.system-sources-refresh"> + <_description>Refresh system sources</_description> + <_message>Authentication is required to refresh the system sources</_message> <icon_name>pk-refresh-cache</icon_name> @@ -136,3 +115,3 @@ - <action id="org.freedesktop.packagekit.set-proxy"> + <action id="org.freedesktop.packagekit.system-network-proxy-configure"> <_description>Set network proxy</_description> diff --git a/src/pk-security-polkit.c b/src/pk-security-polkit.c index 0b13fe4dd..30744afbf 100644 --- a/src/pk-security-polkit.c +++ b/src/pk-security-polkit.c @@ -107,28 +107,26 @@ pk_security_role_to_action (PkSecurity *security, gboolean trusted, PkRoleEnum r - if (role == PK_ROLE_ENUM_UPDATE_PACKAGES) { - policy = "org.freedesktop.packagekit.update-package"; - } else if (role == PK_ROLE_ENUM_UPDATE_SYSTEM) { - policy = "org.freedesktop.packagekit.update-system"; - } else if (role == PK_ROLE_ENUM_REMOVE_PACKAGES) { - policy = "org.freedesktop.packagekit.remove"; - } else if (role == PK_ROLE_ENUM_INSTALL_PACKAGES) { - policy = "org.freedesktop.packagekit.install"; - } else if (role == PK_ROLE_ENUM_INSTALL_FILES && trusted) { - policy = "org.freedesktop.packagekit.localinstall-trusted"; - } else if (role == PK_ROLE_ENUM_INSTALL_FILES && !trusted) { - policy = "org.freedesktop.packagekit.localinstall-untrusted"; + if (role == PK_ROLE_ENUM_UPDATE_PACKAGES || + role == PK_ROLE_ENUM_UPDATE_SYSTEM) { + policy = "org.freedesktop.packagekit.system-update"; } else if (role == PK_ROLE_ENUM_INSTALL_SIGNATURE) { - policy = "org.freedesktop.packagekit.install-signature"; - } else if (role == PK_ROLE_ENUM_ACCEPT_EULA) { - policy = "org.freedesktop.packagekit.accept-eula"; + policy = "org.freedesktop.packagekit.system-trust-signing-key"; } else if (role == PK_ROLE_ENUM_ROLLBACK) { - policy = "org.freedesktop.packagekit.rollback"; + policy = "org.freedesktop.packagekit.system-rollback"; } else if (role == PK_ROLE_ENUM_REPO_ENABLE || role == PK_ROLE_ENUM_REPO_SET_DATA) { - policy = "org.freedesktop.packagekit.repo-change"; + policy = "org.freedesktop.packagekit.systems-sources-configure"; } else if (role == PK_ROLE_ENUM_REFRESH_CACHE) { - policy = "org.freedesktop.packagekit.refresh-cache"; - /* PRIVATE: not actually roles */ + policy = "org.freedesktop.packagekit.system-sources-refresh"; } else if (role == PK_ROLE_ENUM_SET_PROXY_PRIVATE) { - policy = "org.freedesktop.packagekit.refresh-cache"; + policy = "org.freedesktop.packagekit.system-network-proxy-configure"; + } else if (role == PK_ROLE_ENUM_REMOVE_PACKAGES) { + policy = "org.freedesktop.packagekit.package-remove"; + } else if (role == PK_ROLE_ENUM_INSTALL_PACKAGES) { + policy = "org.freedesktop.packagekit.package-install"; + } else if (role == PK_ROLE_ENUM_INSTALL_FILES && trusted) { + policy = "org.freedesktop.packagekit.package-install"; + } else if (role == PK_ROLE_ENUM_INSTALL_FILES && !trusted) { + policy = "org.freedesktop.packagekit.package-install-untrusted"; + } else if (role == PK_ROLE_ENUM_ACCEPT_EULA) { + policy = "org.freedesktop.packagekit.package-eula-accept"; } |