[Differential] [Request, 32 lines] D3102: Do not ask for root permissions when it's unnecessary
antlarr (Antonio Larrosa Jimenez)
noreply at phabricator.kde.org
Tue Oct 18 17:06:38 UTC 2016
antlarr created this revision.
antlarr added a reviewer: Plasma.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.
REVISION SUMMARY
Only save values that were really changed
This allows to change settings without being asked for the root password
to save things that weren't modified by the user, so the
request for the root password was unnecessary.
Remove unneeded UncacheUser/CacheUser calls
Modifying the Real Name of the user was requesting the root password
because of the calls to UncacheUser/CacheUser, since modifying the Real
Name doesn't in fact need extra permissions. Also, none of the other
properties call UncacheUser/CacheUser when they're being modified, so
I tried removing the calls and it works much better here.
TEST PLAN
I tested changing avatar and Real Name and looking at /etc/passwd and ~/.face
that they were correctly changed while not getting any polkit dialog
requesting the root password.
REPOSITORY
rUSERMANAGER User Manager
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D3102
AFFECTED FILES
src/accountinfo.cpp
src/lib/accountmodel.cpp
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: antlarr, #plasma
Cc: plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20161018/bc5ee4b5/attachment.html>
More information about the Plasma-devel
mailing list