loginDialog: ask for username up front if disable-user-list==TRUE
Right now, we rely on PAM to ask for the username if disable-user-list is TRUE. This is suboptimal because it means we can't check if we should show a session menu. This commit changes disable-user-list==TRUE to ask for a username up front, rather than have PAM do it. https://bugzilla.gnome.org/show_bug.cgi?id=706607
This commit is contained in:
parent
e0574d2861
commit
44e3811520
@ -591,11 +591,14 @@ const LoginDialog = new Lang.Class({
|
|||||||
|
|
||||||
this._user = null;
|
this._user = null;
|
||||||
|
|
||||||
if (!this._disableUserList &&
|
if (beginRequest == AuthPrompt.BeginRequestType.PROVIDE_USERNAME) {
|
||||||
beginRequest == AuthPrompt.BeginRequestType.PROVIDE_USERNAME)
|
if (!this._disableUserList)
|
||||||
this._showUserList();
|
this._showUserList();
|
||||||
else
|
else
|
||||||
|
this._hideUserListAskForUsernameAndBeginVerification();
|
||||||
|
} else {
|
||||||
this._hideUserListAndBeginVerification();
|
this._hideUserListAndBeginVerification();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDefaultSessionChanged: function(client, sessionId) {
|
_onDefaultSessionChanged: function(client, sessionId) {
|
||||||
@ -606,7 +609,7 @@ const LoginDialog = new Lang.Class({
|
|||||||
if (this._authPrompt.verificationStatus != AuthPrompt.AuthPromptStatus.VERIFYING)
|
if (this._authPrompt.verificationStatus != AuthPrompt.AuthPromptStatus.VERIFYING)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (this._user && this._user.is_logged_in())
|
if (this._user && this._user.is_loaded && this._user.is_logged_in())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -650,6 +653,7 @@ const LoginDialog = new Lang.Class({
|
|||||||
this._authPrompt.disconnect(nextSignalId);
|
this._authPrompt.disconnect(nextSignalId);
|
||||||
this._authPrompt.updateSensitivity(false);
|
this._authPrompt.updateSensitivity(false);
|
||||||
let answer = this._authPrompt.getAnswer();
|
let answer = this._authPrompt.getAnswer();
|
||||||
|
this._user = this._userManager.get_user(answer);
|
||||||
this._authPrompt.clear();
|
this._authPrompt.clear();
|
||||||
this._authPrompt.startSpinning();
|
this._authPrompt.startSpinning();
|
||||||
this._authPrompt.begin({ userName: answer });
|
this._authPrompt.begin({ userName: answer });
|
||||||
|
Loading…
Reference in New Issue
Block a user