Review Request 126724: Expose callingUser in HelperSupport if available
Albert Astals Cid
aacid at kde.org
Sat Feb 25 22:53:10 UTC 2017
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126724/#review102607
-----------------------------------------------------------
Martin any reason this was not commmited? Should I?
- Albert Astals Cid
On Jan. 12, 2016, 9:36 a.m., Martin Gräßlin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126724/
> -----------------------------------------------------------
>
> (Updated Jan. 12, 2016, 9:36 a.m.)
>
>
> Review request for KDE Frameworks, Dario Freddi and David Edmundson.
>
>
> Repository: kauth
>
>
> Description
> -------
>
> The Polkit backend is able to retrieve the calling user. As this is
> a useful information for a helper the information can be exposed in
> the AuthBackend and be retrieved through the HelperSupport.
>
>
> Diffs
> -----
>
> src/AuthBackend.h c67a706dda107c9815e3c3f74c628fed6d2e4dcc
> src/AuthBackend.cpp ff91dd580919af9046b3f3d26f340885d54d370e
> src/CMakeLists.txt 1b6930d1db89f6ecc1223772b6632c57762f829f
> src/backends/polkit-1/Polkit1Backend.cpp 78ee5bb6d97d9d83beec21e197a947dfc994b2a9
> src/kauthhelpersupport.h 2828ec21aa00b7fb35dcf19db7f3869158e85b1d
> src/kauthhelpersupport.cpp c2a88d7cc574eb6ab092f0981b828fd4c68ba025
>
> Diff: https://git.reviewboard.kde.org/r/126724/diff/
>
>
> Testing
> -------
>
> a helper with:
> ActionReply KScreenLockerAuthHelper::save(const QVariantMap &args)
> {
> auto user = KAuth::HelperSupport::callingUser();
>
> QFile file(QStringLiteral("/tmp/authtest"));
> file.open(QIODevice::WriteOnly);
> file.write(user->homeDir().toUtf8());
> file.write("\n");
> file.write(user->loginName().toUtf8());
> file.write("\n");
> file.write(QByteArray::number(user->userId().nativeId()));
> file.write("\n");
>
> return ActionReply::SuccessReply();
> }
>
> created the file /tmp/authtest with the following content:
>
> /home/martin
> martin
> 1000
>
> Which matches my user.
>
>
> Thanks,
>
> Martin Gräßlin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170225/7a048f4e/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list