[gnome-shell] gdmUtil: make _startService support no username
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] gdmUtil: make _startService support no username
- Date: Thu, 22 Aug 2013 13:41:30 +0000 (UTC)
commit 9720301d01430eb76b4f131c388cc83bc870cabd
Author: Ray Strode <rstrode redhat com>
Date: Wed Aug 21 18:05:55 2013 -0400
gdmUtil: make _startService support no username
commit fd11ad95f61b904d6f7014f8d56c1c27d88af65c factored
out duplicated code, but unintentionally dropped support
for beginning verification without a username.
This commit brings it back.
https://bugzilla.gnome.org/show_bug.cgi?id=706542
js/gdm/util.js | 47 ++++++++++++++++++++++++++++++++---------------
1 files changed, 32 insertions(+), 15 deletions(-)
---
diff --git a/js/gdm/util.js b/js/gdm/util.js
index bfbd1b3..f421902 100644
--- a/js/gdm/util.js
+++ b/js/gdm/util.js
@@ -381,21 +381,38 @@ const ShellUserVerifier = new Lang.Class({
_startService: function(serviceName) {
this._hold.acquire();
- this._userVerifier.call_begin_verification_for_user(serviceName,
- this._userName,
- this._cancellable,
- Lang.bind(this, function(obj, result) {
- try {
- obj.call_begin_verification_for_user_finish(result);
- } catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
- return;
- } catch(e) {
- this._reportInitError('Failed to start verification for user', e);
- return;
- }
-
- this._hold.release();
- }));
+ if (this._userName) {
+ this._userVerifier.call_begin_verification_for_user(serviceName,
+ this._userName,
+ this._cancellable,
+ Lang.bind(this, function(obj, result) {
+ try {
+ obj.call_begin_verification_for_user_finish(result);
+ } catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
+ return;
+ } catch(e) {
+ this._reportInitError('Failed to start verification for user', e);
+ return;
+ }
+
+ this._hold.release();
+ }));
+ } else {
+ this._userVerifier.call_begin_verification(serviceName,
+ this._cancellable,
+ Lang.bind(this, function(obj, result) {
+ try {
+ obj.call_begin_verification_finish(result);
+ } catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
+ return;
+ } catch(e) {
+ this._reportInitError('Failed to start verification', e);
+ return;
+ }
+
+ this._hold.release();
+ }));
+ }
},
_beginVerification: function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]