Changeset View
Changeset View
Standalone View
Standalone View
src/kauthexecutejob.cpp
Show First 20 Lines • Show All 119 Lines • ▼ Show 20 Line(s) | 119 | if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::AuthorizeFromClientCapability) { | |||
---|---|---|---|---|---|
120 | if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::PreAuthActionCapability) { | 120 | if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::PreAuthActionCapability) { | ||
121 | BackendsManager::authBackend()->preAuthAction(action.name(), action.parentWidget()); | 121 | BackendsManager::authBackend()->preAuthAction(action.name(), action.parentWidget()); | ||
122 | } | 122 | } | ||
123 | 123 | | |||
124 | Action::AuthStatus s = BackendsManager::authBackend()->authorizeAction(action.name()); | 124 | Action::AuthStatus s = BackendsManager::authBackend()->authorizeAction(action.name()); | ||
125 | 125 | | |||
126 | if (s == Action::AuthorizedStatus) { | 126 | if (s == Action::AuthorizedStatus) { | ||
127 | if (action.hasHelper()) { | 127 | if (action.hasHelper()) { | ||
128 | BackendsManager::helperProxy()->executeAction(action.name(), action.helperId(), action.arguments(), action.timeout()); | 128 | BackendsManager::helperProxy()->executeAction(action.name(), action.helperId(), action.detailsV2(), action.arguments(), action.timeout()); | ||
129 | } else { | 129 | } else { | ||
130 | // Done | 130 | // Done | ||
131 | actionPerformedSlot(action.name(), ActionReply::SuccessReply()); | 131 | actionPerformedSlot(action.name(), ActionReply::SuccessReply()); | ||
132 | } | 132 | } | ||
133 | } else { | 133 | } else { | ||
134 | // Abort if authorization fails | 134 | // Abort if authorization fails | ||
135 | switch (s) { | 135 | switch (s) { | ||
136 | case Action::DeniedStatus: | 136 | case Action::DeniedStatus: | ||
Show All 18 Lines | 154 | if (BackendsManager::authBackend()->capabilities() & KAuth::AuthBackend::PreAuthActionCapability) { | |||
155 | BackendsManager::authBackend()->preAuthAction(action.name(), action.parentWidget()); | 155 | BackendsManager::authBackend()->preAuthAction(action.name(), action.parentWidget()); | ||
156 | } | 156 | } | ||
157 | if (!action.hasHelper()) { | 157 | if (!action.hasHelper()) { | ||
158 | ActionReply r(ActionReply::InvalidActionReply()); | 158 | ActionReply r(ActionReply::InvalidActionReply()); | ||
159 | r.setErrorDescription(tr("The current backend only allows helper authorization, but this action does not have a helper.")); | 159 | r.setErrorDescription(tr("The current backend only allows helper authorization, but this action does not have a helper.")); | ||
160 | actionPerformedSlot(action.name(), r); | 160 | actionPerformedSlot(action.name(), r); | ||
161 | return; | 161 | return; | ||
162 | } | 162 | } | ||
163 | BackendsManager::helperProxy()->executeAction(action.name(), action.helperId(), action.arguments(), action.timeout()); | 163 | BackendsManager::helperProxy()->executeAction(action.name(), action.helperId(), action.detailsV2(), action.arguments(), action.timeout()); | ||
164 | } else { | 164 | } else { | ||
165 | // There's something totally wrong here | 165 | // There's something totally wrong here | ||
166 | ActionReply r(ActionReply::BackendError); | 166 | ActionReply r(ActionReply::BackendError); | ||
167 | r.setErrorDescription(tr("The backend does not specify how to authorize")); | 167 | r.setErrorDescription(tr("The backend does not specify how to authorize")); | ||
168 | actionPerformedSlot(action.name(), r); | 168 | actionPerformedSlot(action.name(), r); | ||
169 | } | 169 | } | ||
170 | } | 170 | } | ||
171 | 171 | | |||
▲ Show 20 Lines • Show All 70 Lines • Show Last 20 Lines |