Doc: Improve documentation around setting ALLOW_INTERACTIVE_AUTHORIZATION in D-Bus
Change-Id: I4830b375c5f8c7986985c1d6caddc51348fb45ed Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 4c86f9b8049ad7717988125c725492febc44010b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
95770f1bd3
commit
2a18c00c2a
@ -398,12 +398,22 @@ int QDBusAbstractInterface::timeout() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
When passed \a enable = \c true it causes all consecutive DBus calls made via
|
Configures whether, for asynchronous calls, the caller
|
||||||
this interface to have the InteractiveAuthorizationAllowed flag set. Passing
|
is prepared to wait for interactive authorization.
|
||||||
false disables this behavior.
|
|
||||||
|
If \a enable is set to \c true, the D-Bus messages generated for
|
||||||
|
asynchronous calls via this interface will set the
|
||||||
|
\c ALLOW_INTERACTIVE_AUTHORIZATION flag.
|
||||||
|
|
||||||
|
This flag is only useful when unprivileged code calls a more privileged
|
||||||
|
method call, and an authorization framework is deployed that allows
|
||||||
|
possibly interactive authorization.
|
||||||
|
|
||||||
|
The default is \c false.
|
||||||
|
|
||||||
\since 6.7
|
\since 6.7
|
||||||
\sa QDBusMessage::setInteractiveAuthorizationAllowed()
|
\sa QDBusMessage::setInteractiveAuthorizationAllowed(),
|
||||||
|
interactiveAuthorizationAllowed()
|
||||||
*/
|
*/
|
||||||
void QDBusAbstractInterface::setInteractiveAuthorizationAllowed(bool enable)
|
void QDBusAbstractInterface::setInteractiveAuthorizationAllowed(bool enable)
|
||||||
{
|
{
|
||||||
@ -411,10 +421,14 @@ void QDBusAbstractInterface::setInteractiveAuthorizationAllowed(bool enable)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns the current value of the InteractiveAuthorizationAllowed flag.
|
Returns whether, for asynchronous calls, the caller
|
||||||
|
is prepared to wait for interactive authorization.
|
||||||
|
|
||||||
|
The default is \c false.
|
||||||
|
|
||||||
\since 6.7
|
\since 6.7
|
||||||
\sa QDBusMessage::setInteractiveAuthorizationAllowed()
|
\sa setInteractiveAuthorizationAllowed(),
|
||||||
|
QDBusMessage::setInteractiveAuthorizationAllowed()
|
||||||
*/
|
*/
|
||||||
bool QDBusAbstractInterface::isInteractiveAuthorizationAllowed() const
|
bool QDBusAbstractInterface::isInteractiveAuthorizationAllowed() const
|
||||||
{
|
{
|
||||||
|
@ -694,20 +694,26 @@ bool QDBusMessage::autoStartService() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Sets the interactive authorization flag to \a enable.
|
Enables or disables the \c ALLOW_INTERACTIVE_AUTHORIZATION flag
|
||||||
This flag only makes sense for method call messages, where it
|
in a message.
|
||||||
tells the D-Bus server that the caller of the method is prepared
|
|
||||||
to wait for interactive authorization to take place (for instance
|
|
||||||
via Polkit) before the actual method is processed.
|
|
||||||
|
|
||||||
By default this flag is false and the other end is expected to
|
This flag only makes sense for method call messages
|
||||||
make any authorization decisions non-interactively and promptly.
|
(\l QDBusMessage::MethodCallMessage). If \a enable
|
||||||
|
is set to \c true, the flag indicates to the callee that the
|
||||||
|
caller of the method is prepared to wait for interactive authorization
|
||||||
|
to take place (for instance via Polkit) before the actual method
|
||||||
|
is processed.
|
||||||
|
|
||||||
|
If \a enable is set to \c false, the flag is not
|
||||||
|
set, meaning that the other end is expected to make any authorization
|
||||||
|
decisions non-interactively and promptly. This is the default.
|
||||||
|
|
||||||
The \c org.freedesktop.DBus.Error.InteractiveAuthorizationRequired
|
The \c org.freedesktop.DBus.Error.InteractiveAuthorizationRequired
|
||||||
error indicates that authorization failed, but could have succeeded
|
error indicates that authorization failed, but could have succeeded
|
||||||
if this flag had been set.
|
if this flag had been set.
|
||||||
|
|
||||||
\sa isInteractiveAuthorizationAllowed()
|
\sa isInteractiveAuthorizationAllowed(),
|
||||||
|
QDBusAbstractInterface::setInteractiveAuthorizationAllowed()
|
||||||
|
|
||||||
\since 5.12
|
\since 5.12
|
||||||
*/
|
*/
|
||||||
@ -717,12 +723,11 @@ void QDBusMessage::setInteractiveAuthorizationAllowed(bool enable)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns the interactive authorization allowed flag, as set by
|
Returns whether the message has the
|
||||||
setInteractiveAuthorizationAllowed(). By default this flag
|
\c ALLOW_INTERACTIVE_AUTHORIZATION flag set.
|
||||||
is false and the other end is expected to make any authorization
|
|
||||||
decisions non-interactively and promptly.
|
|
||||||
|
|
||||||
\sa setInteractiveAuthorizationAllowed()
|
\sa setInteractiveAuthorizationAllowed(),
|
||||||
|
QDBusAbstractInterface::isInteractiveAuthorizationAllowed()
|
||||||
|
|
||||||
\since 5.12
|
\since 5.12
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user