Thanks for the hints, Martin. I gave up on ls-dbus-backend, discovered
gir1.2-polkit-1.0 and wrote a new function in utils.py. Now the code
runs, but there is a tiny problem: AdminPrivileges() always returns
True. :(

On 2012-12-23 10:56, Martin Pitt wrote:
> But with polkit we can probably just drop the whole is_admin check
> completely. If a non-admin user is starting l-s, the polkit dialog will
> still allow you to authenticate as another user who is an admin.

Simple indeed, bug would it really be a solution? Even if the polkit
dialog allows you to enter the credentials of an admin user, as long as
you are a standard user you typically don't know any admin password, do
you? Personally I think that the current UI, where the admin only
controls are disabled (greyed out) for standard users, is better than
letting the user know only by an authentication failure.

Question is if there is a way to make polkit tell whether you can
authenticate as the current _user_. Unfortunately the get_is_challenge()
method seems to take into account the possibility to enter an admin
password...

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1008344

Title:
  checks "admin" group membership instead of querying polkit

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/language-selector/+bug/1008344/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to