[gnome-shell/wip/disable-user-list: 2/4] loginDialog: don't rely on PAM to ask for a username
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/disable-user-list: 2/4] loginDialog: don't rely on PAM to ask for a username
- Date: Wed, 31 Oct 2012 18:53:32 +0000 (UTC)
commit ede8d0aa616f8b7c99178f32754670361b454d9d
Author: Ray Strode <rstrode redhat com>
Date: Tue Oct 30 15:06:44 2012 -0400
loginDialog: don't rely on PAM to ask for a username
For the "Not Listed?" case we'll ultimately want to
identify when the user has entered their username.
Right now, we pass "null" in for an initial username,
and let the PAM conversation machinery ask the user.
This commit changes the "Not Listed?" code to ask the
user their username up front, before starting the PAM
conversation (in much the same way we do if the user
picks a user from the user list).
https://bugzilla.gnome.org/show_bug.cgi?id=660660
js/gdm/loginDialog.js | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
---
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index b3240fc..664e98d 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -961,6 +961,23 @@ const LoginDialog = new Lang.Class({
return batch.run();
},
+ _askForUsernameAndLogIn: function() {
+ this._promptLabel.set_text(_("Username: "));
+ this._promptEntry.set_text('');
+ this._promptEntry.clutter_text.set_password_char('');
+
+ let tasks = [this._showPrompt,
+
+ function() {
+ let userName = this._promptEntry.get_text();
+ this._promptEntry.reactive = false;
+ return this._beginVerificationForUser(userName);
+ }];
+
+ let batch = new Batch.ConsecutiveBatch(this, tasks);
+ return batch.run();
+ },
+
_onSessionOpened: function(client, serviceName) {
this._greeter.call_start_session_when_ready_sync(serviceName, true, null);
},
@@ -1106,10 +1123,7 @@ const LoginDialog = new Lang.Class({
this._fadeOutNotListedButton]),
function() {
- let hold = new Batch.Hold();
-
- this._userVerifier.begin(null, hold);
- return hold;
+ return this._askForUsernameAndLogIn();
}];
let batch = new Batch.ConsecutiveBatch(this, tasks);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]