PolicyKit: Branch 'master'

David Zeuthen david at kemper.freedesktop.org
Tue Sep 29 09:01:17 PDT 2009


 data/org.freedesktop.PolicyKit1.Authority.xml |    2 +-
 src/polkit/polkitauthority.c                  |   10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

New commits:
commit ce29effd0d2405e2adea7dc496be8ed841083ed1
Author: David Zeuthen <davidz at redhat.com>
Date:   Tue Sep 29 11:57:23 2009 -0400

    Clarify when AllowUserInteraction should and shouldn't be used
    
    See https://bugzilla.redhat.com/show_bug.cgi?id=526053 for more details.

diff --git a/data/org.freedesktop.PolicyKit1.Authority.xml b/data/org.freedesktop.PolicyKit1.Authority.xml
index 188f8e1..0263c16 100644
--- a/data/org.freedesktop.PolicyKit1.Authority.xml
+++ b/data/org.freedesktop.PolicyKit1.Authority.xml
@@ -242,7 +242,7 @@
     <!-- ---------------------------------------------------------------------------------------------------- -->
 
     <method name="CheckAuthorization">
-      <annotation name="org.gtk.EggDBus.DocString" value="<para>Checks if @subject is authorized to perform the action with identifier @action_id.</para><para>If @cancellation_id is non-empty and already in use for the caller, the %org.freedesktop.PolicyKit1.Error.CancellationIdNotUnique error is returned.</para>"/>
+      <annotation name="org.gtk.EggDBus.DocString" value="<para>Checks if @subject is authorized to perform the action with identifier @action_id.</para><para>If @cancellation_id is non-empty and already in use for the caller, the %org.freedesktop.PolicyKit1.Error.CancellationIdNotUnique error is returned.</para><para>Note that %CheckAuthorizationFlags.AllowUserInteraction SHOULD be passed ONLY if the event that triggered the authorization check is stemming from an user action, e.g. the user pressing a button or attaching a device.</para>"/>
 
       <arg name="subject" direction="in" type="(sa{sv})">
         <annotation name="org.gtk.EggDBus.DocString" value="A #Subject struct."/>
diff --git a/src/polkit/polkitauthority.c b/src/polkit/polkitauthority.c
index 5792a5f..1f89dfd 100644
--- a/src/polkit/polkitauthority.c
+++ b/src/polkit/polkitauthority.c
@@ -497,6 +497,11 @@ polkit_authority_check_authorization_async (PolkitAuthority               *autho
  * Asynchronously checks if @subject is authorized to perform the action represented
  * by @action_id.
  *
+ * Note that #POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION
+ * SHOULD be passed ONLY if the event that triggered the authorization
+ * check is stemming from an user action, e.g. the user pressing a
+ * button or attaching a device.
+ *
  * When the operation is finished, @callback will be invoked. You can then
  * call polkit_authority_check_authorization_finish() to get the result of
  * the operation.
@@ -628,6 +633,11 @@ polkit_authority_check_authorization_finish (PolkitAuthority          *authority
  *
  * Checks if @subject is authorized to perform the action represented by @action_id.
  *
+ * Note that #POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION
+ * SHOULD be passed ONLY if the event that triggered the authorization
+ * check is stemming from an user action, e.g. the user pressing a
+ * button or attaching a device.
+ *
  * Returns: A #PolkitAuthorizationResult or %NULL if @error is set. Free with g_object_unref().
  */
 PolkitAuthorizationResult *


More information about the hal-commit mailing list