Review Request 126724: Expose callingUser in HelperSupport if available

Martin Gräßlin mgraesslin at kde.org
Sun Feb 26 12:16:49 UTC 2017



> On Feb. 25, 2017, 11:53 p.m., Albert Astals Cid wrote:
> > Martin any reason this was not commmited? Should I?

If I remember correctly it depends on a newer polkit-qt functionality and polkit-qt hasn't seen a release yet. Unfortunately I cannot really check as the diff now only shows whitespace changes (yay for reviewboard to break the diffs)


- Martin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126724/#review102607
-----------------------------------------------------------


On Jan. 12, 2016, 10: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, 10: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/20170226/7b780e54/attachment.html>


More information about the Kde-frameworks-devel mailing list