KDECore
kauthaction.cpp
Go to the documentation of this file.
108 if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::CheckActionExistenceCapability) {
183 if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::PreAuthActionCapability) {
188 if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::AuthorizeFromClientCapability) {
191 } else if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::AuthorizeFromHelperCapability) {
198 if (BackendsManager::authBackend()->isCallerAuthorized(d->name, BackendsManager::authBackend()->callerID())) {
217 if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::AuthorizeFromClientCapability) {
219 if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::PreAuthActionCapability) {
224 } else if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::AuthorizeFromHelperCapability) {
248 bool Action::executeActions(const QList<Action> &actions, QList<Action> *deniedActions, const QString &helperId)
253 bool Action::executeActions(const QList< Action >& actions, QList< Action >* deniedActions, const QString& helperId, QWidget* parent)
259 if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::AuthorizeFromClientCapability) {
260 if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::PreAuthActionCapability) {
271 } else if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::AuthorizeFromHelperCapability) {
312 if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::AuthorizeFromClientCapability) {
313 if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::PreAuthActionCapability) {
330 } else if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::AuthorizeFromHelperCapability) {
360 if( BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::AuthorizeFromClientCapability ){
361 // RJVB: authorisation through DBus seems to be flaky (at least when using the OSX keychain ... maybe because DBus
368 if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::PreAuthActionCapability) {
virtual void stopAction(const QString &action, const QString &helperID)=0
virtual void setupAction(const QString &action)=0
static const ActionReply InvalidActionReply
errorCode() == InvalidAction
Definition: kauthactionreply.h:390
static ActionWatcher * watcher(const QString &action)
Factory method to get watchers.
Definition: kauthactionwatcher.cpp:67
The user could obtain the authorization after authentication.
Definition: kauthaction.h:83
AuthStatus status() const
Gets information about the authorization status of an action.
Definition: kauthaction.cpp:238
void push_back(const T &value)
static AuthBackend * authBackend()
Definition: BackendsManager.cpp:120
AuthStatus earlyAuthorize() const
Tries to resolve authorization status in the best possible way without executing the action...
Definition: kauthaction.cpp:211
virtual Action::AuthStatus authorizeAction(const QString &action)=0
static const ActionReply SuccessReply
An empty successful reply. Same as using the default constructor.
Definition: kauthactionreply.h:385
virtual void preAuthAction(const QString &action, QWidget *parent)
Definition: AuthBackend.cpp:68
bool isValid() const
Returns if the object represents a valid action.
Definition: kauthaction.cpp:128
The user pressed Cancel the authentication dialog. Currently used only on the mac.
Definition: kauthaction.h:84
void addArgument(const QString &key, const QVariant &value)
Convenience method to add an argument.
Definition: kauthaction.cpp:138
static const ActionReply AuthorizationDeniedReply
errorCode() == AuthorizationDenied
Definition: kauthactionreply.h:391
void setArguments(const QVariantMap &arguments)
Sets the map object used to pass arguments to the helper.
Definition: kauthaction.cpp:133
virtual ActionReply executeAction(const QString &action, const QString &helperID, const QVariantMap &arguments)=0
Class used to receive notifications about the status of an action execution.
Definition: kauthactionwatcher.h:50
static HelperProxy * helperProxy()
Definition: BackendsManager.cpp:129
The authorization has been denied by the authorization backend.
Definition: kauthaction.h:79
bool isEmpty() const
static bool executeActions(const QList< Action > &actions, QList< Action > *deniedActions, const QString &helperId)
Asynchronously executes a group of actions with a single request.
Definition: kauthaction.cpp:248
virtual Action::AuthStatus authorizeAction(const QString &action, const QString &helperID)=0
The authorization has been granted by the authorization backend.
Definition: kauthaction.h:82
Definition: kaboutdata.h:33
static const ActionReply UserCancelledReply
errorCode() == UserCancelled
Definition: kauthactionreply.h:392
bool operator!=(const Action &action) const
Negated comparison operator.
Definition: kauthaction.cpp:92
virtual QByteArray callerID() const =0
void setHelperID(const QString &id)
Sets the default helper ID used for actions execution.
Definition: kauthaction.cpp:159
QString helperID() const
Gets the default helper ID used for actions execution.
Definition: kauthaction.cpp:153
virtual bool actionExists(const QString &action)
Definition: AuthBackend.cpp:62
virtual bool executeActions(const QList< QPair< QString, QVariantMap > > &list, const QString &helperID)=0
Class that encapsulates a reply coming from the helper after executing an action. ...
Definition: kauthactionreply.h:370
QVariantMap arguments() const
Returns map object used to pass arguments to the helper.
Definition: kauthaction.cpp:143
void setParentWidget(QWidget *parent)
Sets a parent widget for the authentication dialog.
Definition: kauthaction.cpp:164
virtual Action::AuthStatus actionStatus(const QString &action)=0
ActionWatcher * watcher()
Gets the ActionWatcher object for this action.
Definition: kauthaction.cpp:148
bool exactMatch(const QString &str) const
QWidget * parentWidget() const
Returns the parent widget for the authentication dialog for this action.
Definition: kauthaction.cpp:169
AuthStatus authorize() const
Acquires authorization for an action without excuting it.
Definition: kauthaction.cpp:176
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.