Changeset View
Changeset View
Standalone View
Standalone View
src/backends/polkit-1/Polkit1Backend.cpp
Show First 20 Lines • Show All 145 Lines • ▼ Show 20 Line(s) | 145 | { | |||
---|---|---|---|---|---|
146 | PolkitQt1::SystemBusNameSubject subject(QString::fromUtf8(callerID())); | 146 | PolkitQt1::SystemBusNameSubject subject(QString::fromUtf8(callerID())); | ||
147 | auto authority = PolkitQt1::Authority::instance(); | 147 | auto authority = PolkitQt1::Authority::instance(); | ||
148 | PolkitQt1::Authority::Result r = authority->checkAuthorizationSync(action, subject, | 148 | PolkitQt1::Authority::Result r = authority->checkAuthorizationSync(action, subject, | ||
149 | PolkitQt1::Authority::None); | 149 | PolkitQt1::Authority::None); | ||
150 | 150 | | |||
151 | if (authority->hasError()) { | 151 | if (authority->hasError()) { | ||
152 | qCDebug(KAUTH) << "Encountered error while checking action status, error code:" << authority->lastError() << authority->errorDetails(); | 152 | qCDebug(KAUTH) << "Encountered error while checking action status, error code:" << authority->lastError() << authority->errorDetails(); | ||
153 | authority->clearError(); | 153 | authority->clearError(); | ||
154 | return Action::InvalidStatus; | ||||
154 | } | 155 | } | ||
155 | 156 | | |||
156 | switch (r) { | 157 | switch (r) { | ||
157 | case PolkitQt1::Authority::Yes: | 158 | case PolkitQt1::Authority::Yes: | ||
158 | return Action::AuthorizedStatus; | 159 | return Action::AuthorizedStatus; | ||
159 | case PolkitQt1::Authority::No: | 160 | case PolkitQt1::Authority::No: | ||
160 | case PolkitQt1::Authority::Unknown: | 161 | case PolkitQt1::Authority::Unknown: | ||
161 | return Action::DeniedStatus; | 162 | return Action::DeniedStatus; | ||
▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines |