Polkit-gnome authentication should autoselect the only user avalible

Bug #308418 reported by gw0
2
Affects Status Importance Assigned to Milestone
policykit-gnome (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: policykit-gnome

I would suggest that in case of only one authorized user for a specific task he should be automatically selected. And not that you need to first click on the "Select user..." to set it - what is annoying.

Reproduce:
- Probably not essential: edit /etc/PolicyKit/PolicyKit.conf so that it requests the password of another user (eg: <define_admin_auth user="root"/>)
- And than click on the Unlock button in any system configuration window.

For me it looks like a patch should be done in polkit-gnome-auth-dialog.c in create_user_combobox(PolkitGnomeAuthDialog *auth_dialog, char **admin_users) and replace lines:
00265 /* Initially select the "Select user..." ... */
00266 gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);
With:
/* Initially select the "Select user..." if there is more than one user else select him ... */
if(n != 1)
    gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);
else
    gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 1);

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.