From f7efa993f16e2b5ba72cf9759a65b2ce2ef66f99 Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Fri, 21 Nov 2008 00:04:53 +0100 Subject: Rename policies with dashes, and add class-edit. --- src/cups-pk-helper-mechanism.c | 8 ++++---- src/org.opensuse.cupspkhelper.mechanism.policy.in | 21 +++++++++++++++------ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/cups-pk-helper-mechanism.c b/src/cups-pk-helper-mechanism.c index 8d4505a..e96d35e 100644 --- a/src/cups-pk-helper-mechanism.c +++ b/src/cups-pk-helper-mechanism.c @@ -809,7 +809,7 @@ cph_mechanism_printer_set_default (CphMechanism *mechanism, reset_killtimer (mechanism); if (!_check_polkit_for_action_v (mechanism, context, - "printeraddremove", "printerdefault", + "printeraddremove", "printer-default", NULL)) return FALSE; @@ -830,7 +830,7 @@ cph_mechanism_printer_set_enabled (CphMechanism *mechanism, reset_killtimer (mechanism); if (!_check_polkit_for_action_v (mechanism, context, - "printeraddremove", "printerenable", + "printeraddremove", "printer-enable", NULL)) return FALSE; @@ -873,7 +873,7 @@ cph_mechanism_server_get_settings (CphMechanism *mechanism, reset_killtimer (mechanism); - if (!_check_polkit_for_action (mechanism, context, "serversettings")) + if (!_check_polkit_for_action (mechanism, context, "server-settings")) return FALSE; settings = cph_cups_server_get_settings (mechanism->priv->cups); @@ -892,7 +892,7 @@ cph_mechanism_server_set_settings (CphMechanism *mechanism, reset_killtimer (mechanism); - if (!_check_polkit_for_action (mechanism, context, "serversettings")) + if (!_check_polkit_for_action (mechanism, context, "server-settings")) return FALSE; ret = cph_cups_server_set_settings (mechanism->priv->cups, settings); diff --git a/src/org.opensuse.cupspkhelper.mechanism.policy.in b/src/org.opensuse.cupspkhelper.mechanism.policy.in index 0c3c876..173a8db 100644 --- a/src/org.opensuse.cupspkhelper.mechanism.policy.in +++ b/src/org.opensuse.cupspkhelper.mechanism.policy.in @@ -8,7 +8,7 @@ http://www.opensuse.org/ printer - + <_description>Set a printer as default printer <_message>Privileges are required to set a printer, or a class, as default printer. @@ -17,7 +17,7 @@ - + <_description>Enable/Disable a printer <_message>Privileges are required to enable/disable a printer, or a class. @@ -26,16 +26,16 @@ - + <_description>Add/Remove/Edit a local printer - <_message>Privileges are required to add/remove/edit a local printer, or a class. + <_message>Privileges are required to add/remove/edit a local printer. no auth_admin - + <_description>Add/Remove/Edit a remote printer <_message>Privileges are required to add/remove/edit a remote printer. @@ -44,7 +44,16 @@ - + + <_description>Add/Remove/Edit a class + <_message>Privileges are required to add/remove/edit a class. + + no + auth_admin + + + + <_description>Get/Set server settings <_message>Privileges are required to get/set server settings. -- cgit v1.2.3