KAuth
Polkit1Backend.cpp
31 setCapabilities(AuthorizeFromHelperCapability | CheckActionExistenceCapability | PreAuthActionCapability);
34 connect(PolkitQt1::Authority::instance(), &PolkitQt1::Authority::configChanged, this, &KAuth::Polkit1Backend::checkForResultChanged);
35 connect(PolkitQt1::Authority::instance(), &PolkitQt1::Authority::consoleKitDBChanged, this, &KAuth::Polkit1Backend::checkForResultChanged);
51 if (QDBusConnection::sessionBus().interface()->isServiceRegistered(QLatin1String("org.kde.polkit-kde-authentication-agent-1"))) {
61 QDBusMessage methodCall = QDBusMessage::createMethodCall(QLatin1String("org.kde.polkit-kde-authentication-agent-1"),
96 PolkitQt1::Authority::Result r = authority->checkAuthorizationSync(action, subject, PolkitQt1::Authority::None);
99 qCDebug(KAUTH) << "Encountered error while checking action status, error code:" << authority->lastError() << authority->errorDetails();
120 AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
125 bool Polkit1Backend::isCallerAuthorized(const QString &action, const QByteArray &callerID, const QVariantMap &details)
136 connect(authority, &PolkitQt1::Authority::checkAuthorizationFinished, &e, [&result, &e](PolkitQt1::Authority::Result _result) {
142 authority->checkAuthorizationWithDetails(action, subject, PolkitQt1::Authority::AllowUserInteraction, polkit1Details);
149 qCDebug(KAUTH) << "Encountered error while checking authorization, error code:" << authority->lastError() << authority->errorDetails();
bool hasError() const
QString fromUtf8(const char *str, int size)
@ AuthorizedStatus
The authorization has been granted by the authorization backend.
Definition: action.h:86
void consoleKitDBChanged()
int exec(QEventLoop::ProcessEventsFlags flags)
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QString baseService() const const
void clearError()
QMap::iterator insert(const Key &key, const T &value)
QDBusConnection sessionBus()
void quit()
void checkAuthorizationFinished(PolkitQt1::Authority::Result)
QByteArray toUtf8() const const
void checkAuthorization(const QString &actionId, const Subject &subject, AuthorizationFlags flags)
AllowUserInteraction
QDBusMessage createMethodCall(const QString &service, const QString &path, const QString &interface, const QString &method)
static Authority * instance(PolkitAuthority *authority=nullptr)
Definition: action.cpp:18
const QString errorDetails() const
QDBusConnection systemBus()
WId effectiveWinId() const const
@ DeniedStatus
The authorization has been denied by the authorization backend.
Definition: action.h:83
ErrorCode lastError() const
@ AuthRequiredStatus
The user could obtain the authorization after authentication.
Definition: action.h:87
@ DetailMessage
The message to show in authentication dialog.
void checkAuthorizationWithDetails(const QString &actionId, const Subject &subject, AuthorizationFlags flags, const DetailsMap &details)
void configChanged()
QDBusPendingCall asyncCall(const QDBusMessage &message, int timeout) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Feb 5 2023 04:14:58 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Feb 5 2023 04:14:58 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.