Commit ce29effd authored by David Zeuthen's avatar David Zeuthen

Clarify when AllowUserInteraction should and shouldn't be used

See https://bugzilla.redhat.com/show_bug.cgi?id=526053 for more details.
parent 49de132d
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
<!-- ---------------------------------------------------------------------------------------------------- --> <!-- ---------------------------------------------------------------------------------------------------- -->
<method name="CheckAuthorization"> <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})"> <arg name="subject" direction="in" type="(sa{sv})">
<annotation name="org.gtk.EggDBus.DocString" value="A #Subject struct."/> <annotation name="org.gtk.EggDBus.DocString" value="A #Subject struct."/>
......
...@@ -497,6 +497,11 @@ polkit_authority_check_authorization_async (PolkitAuthority *autho ...@@ -497,6 +497,11 @@ polkit_authority_check_authorization_async (PolkitAuthority *autho
* Asynchronously checks if @subject is authorized to perform the action represented * Asynchronously checks if @subject is authorized to perform the action represented
* by @action_id. * 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 * When the operation is finished, @callback will be invoked. You can then
* call polkit_authority_check_authorization_finish() to get the result of * call polkit_authority_check_authorization_finish() to get the result of
* the operation. * the operation.
...@@ -628,6 +633,11 @@ polkit_authority_check_authorization_finish (PolkitAuthority *authority ...@@ -628,6 +633,11 @@ polkit_authority_check_authorization_finish (PolkitAuthority *authority
* *
* Checks if @subject is authorized to perform the action represented by @action_id. * 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(). * Returns: A #PolkitAuthorizationResult or %NULL if @error is set. Free with g_object_unref().
*/ */
PolkitAuthorizationResult * PolkitAuthorizationResult *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment