authority: add support for passing details to polkit

Authored by mgerstner on Apr 2 2019, 6:32 PM.

Description

authority: add support for passing details to polkit

Summary:
Currently polkit-qt-1 doesn't support to pass details during the checkAuthorization() call. Details are for example required to employ runtime generated authorization messages that contain placeholders like "authentication required for accessing $(device)". This feature can be helpful to improve the end user experience and security, since the exact context of a privileged operation can be expressed better. Polkit documentation about this details parameter can be found here.

This change adds alternative versions of checkAuthorization() and checkAuthorizationSync() that accepts an additional QMap<QString, QString> details parameter. In the implementation this map is converted into the required polkit level PolkitDetails type and passed to the according polkit functions as necessary.

To conform with the KDE binary compatibility policy I didn't extend or overload the existing checkAuthorization() and checkAuthorizationSync() functions, but introduced newly named functions.

Reviewers: Frameworks, chinmoyr, fvogt, bruns, davidedmundson

Reviewed By: bruns, davidedmundson

Subscribers: elvisangelaccio, ngraham, mati865, kde-frameworks-devel

Differential Revision: https://phabricator.kde.org/D18845

Details

Committed
ngrahamApr 2 2019, 6:36 PM
Reviewer
bruns
Differential Revision
D18845: authority: add support for passing details to polkit
Parents
R563:10024cad2a37: Fix typo in comments
Branches
Unknown
Tags
Unknown