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 758568 - Newly-created user account does not appear if password mode is set at login
Newly-created user account does not appear if password mode is set at login
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: login-screen
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: Ray Strode [halfline]
gnome-shell-maint
: 746079 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-11-23 23:43 UTC by Michael Catanzaro
Modified: 2016-01-05 20:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
loginDialog: Reconsider user for user list when user changes (3.19 KB, patch)
2015-11-24 00:33 UTC, Michael Catanzaro
committed Details | Review

Description Michael Catanzaro 2015-11-23 23:43:29 UTC
* Create a new user account in g-c-c, leave password mode as 'set at login'
* Log out of gnome-shell
* Observe that the user is missing from the user list

The problem is that when the LoginDialog object receives a user-added signal from accountsservice, the new account's password mode is not yet set, so the account is still locked and the call to _userList.addUser() returns early, so as to not show locked accounts in the user list. We probably need to connect to notify::locked to get a heads-up when the account should be added to (or removed from!) the user list.
Comment 1 Michael Catanzaro 2015-11-24 00:33:22 UTC
Created attachment 316126 [details] [review]
loginDialog: Reconsider user for user list when user changes

Generally a user-changed operation will be uninteresting, but if the
user is currently in the user list and the account changes to locked, we
want to remove it from the list, or if the user is not in the list and
the account changed to unlocked, we want to add it to the list. This
fixes the case where a new user account created in gnome-control-center
does not appear in the user list. The password mode is set in the new
account immediately after it is created, but the operations are not
atomic, so the login dialog considers the new user account when it is
still locked and rejects it from being displayed, then immediately
afterwards the account is unlocked. This commit causes the login dialog
to show the account when this occurs.

The containsUser() check here is not strictly necessary, but reduces
spurious calls to addUser() and removeUser(), since there's no easy way
to check if the locked status of the account has changed (as it's much
easier to connect to one signal on the UserManager than to
notify::locked on each User object).
Comment 2 Michael Catanzaro 2015-12-02 17:20:48 UTC
Got a LGTM from Substitute Ray (Florian)
Comment 3 Michael Catanzaro 2016-01-05 20:35:28 UTC
*** Bug 746079 has been marked as a duplicate of this bug. ***