KDECore
AuthServicesBackend.cpp
Go to the documentation of this file.
37 AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &s_authRef);
43 static OSStatus GetActionRights(const QString &action, AuthorizationFlags flags, AuthorizationRef auth=NULL)
62 // On OS X, the suggestion is to make the helper grant the actual privilege. The app does instead a
76 // On OS X, the suggestion is to make the helper grant the actual privilege. The app does instead a
81 OSStatus result = GetActionRights( action, kAuthorizationFlagExtendRights | kAuthorizationFlagInteractionAllowed );
82 // qWarning() << "AuthServicesBackend::authorizeAction(" << action << ") AuthorizationCopyRights returned" << result;
94 OSStatus result = GetActionRights( action, kAuthorizationFlagExtendRights | kAuthorizationFlagPreAuthorize );
95 // qWarning() << "AuthServicesBackend::actionStatus(" << action << ") AuthorizationCopyRights returned" << result;
124 // qWarning() << "AuthorizationCreateFromExternalForm(" << action << "," << callerID.constData() << ") failed";
128 OSStatus result = GetActionRights( action, kAuthorizationFlagExtendRights | kAuthorizationFlagInteractionAllowed,
132 // qWarning() << "AuthServicesBackend::isCallerAuthorized(" << action << "," << callerID.constData() << ") AuthorizationCopyRights returned" << result;
137 // RJVB: OS X doesn't distinguish between "action doesn't exist" and "action not allowed". So the
138 // best thing we can do is return true and hope that the action will be created if it didn't exist...
142 // qWarning() << "AuthServicesBackend::actionExists(" << action << ") AuthorizationRightGet returned" << exists;
virtual void setupAction(const QString &)
Definition: AuthServicesBackend.cpp:71
The user could obtain the authorization after authentication.
Definition: kauthaction.h:83
virtual Action::AuthStatus actionStatus(const QString &)
Definition: AuthServicesBackend.cpp:92
virtual bool isCallerAuthorized(const QString &action, QByteArray callerID)
Definition: AuthServicesBackend.cpp:116
The authorization has been denied by the authorization backend.
Definition: kauthaction.h:79
int count(char ch) const
The authorization has been granted by the authorization backend.
Definition: kauthaction.h:82
virtual Action::AuthStatus authorizeAction(const QString &)
Definition: AuthServicesBackend.cpp:79
static OSStatus GetActionRights(const QString &action, AuthorizationFlags flags, AuthorizationRef auth=NULL)
Definition: AuthServicesBackend.cpp:43
void setCapabilities(Capabilities capabilities)
Definition: AuthBackend.cpp:52
char * data()
Definition: AuthBackend.h:31
virtual QByteArray callerID() const
Definition: AuthServicesBackend.cpp:106
AuthServicesBackend()
Definition: AuthServicesBackend.cpp:65
virtual bool actionExists(const QString &action)
Definition: AuthServicesBackend.cpp:139
QByteArray toUtf8() const
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.