After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 698276 - If long wait before 'Add' in Add account dialog, then lots of polkit prompts
If long wait before 'Add' in Add account dialog, then lots of polkit prompts
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: User Accounts
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
3.10
Depends on:
Blocks:
 
 
Reported: 2013-04-18 09:12 UTC by Stef Walter
Modified: 2013-04-23 14:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
user-accounts: Reacquire permissions before adding account (6.36 KB, patch)
2013-04-18 15:52 UTC, Stef Walter
committed Details | Review

Description Stef Walter 2013-04-18 09:12:01 UTC
If you "Unlock" in the Users panel, then wait a long time before clicking 'Add' the polkit permissions expire. One gets lots of polkit prompts in a row, especially when adding an Enterprise Login.

We should just reacquire permissions when the 'Add' button is clicked.

Found on: https://fedoraproject.org/wiki/Test_Day:2013-04-18_FreeIPA
Comment 1 Stef Walter 2013-04-18 15:52:09 UTC
Created attachment 241834 [details] [review]
user-accounts: Reacquire permissions before adding account

If necessary, reacquire permissions before starting to add an
account.
Comment 2 Stef Walter 2013-04-18 15:53:07 UTC
Patch tested on gnome-3-8, applies to master.
Comment 3 Bastien Nocera 2013-04-22 15:43:59 UTC
Review of attachment 241834 [details] [review]:

Looks good to commit after the bug fixes below. Thanks!

::: panels/user-accounts/um-account-dialog.c
@@ +50,3 @@
                                     gpointer user_data);
 
+static void   um_account_dialog_response

No need for the linefeed here, we have wide monitors.

@@ +1100,3 @@
+		g_return_if_fail (g_permission_get_allowed (self->permission));
+		um_account_dialog_response (GTK_DIALOG (self), GTK_RESPONSE_OK);
+

unnecessary linefeed.

@@ +1174,3 @@
         if (self->cancellable)
                 g_object_unref (self->cancellable);
+        if (self->permission)

g_clear_object (&self->permission);

@@ +1218,3 @@
         self->cancellable = g_cancellable_new ();
 
+        if (self->permission)

g_clear_object (&self->permission);
Comment 4 Stef Walter 2013-04-23 14:52:40 UTC
Attachment 241834 [details] pushed as dcc2814 - user-accounts: Reacquire permissions before adding account