gdmUtil: make _startService support no username
commit fd11ad95f6
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
This commit is contained in:
parent
5ea75499fe
commit
9720301d01
@ -381,21 +381,38 @@ const ShellUserVerifier = new Lang.Class({
|
|||||||
|
|
||||||
_startService: function(serviceName) {
|
_startService: function(serviceName) {
|
||||||
this._hold.acquire();
|
this._hold.acquire();
|
||||||
this._userVerifier.call_begin_verification_for_user(serviceName,
|
if (this._userName) {
|
||||||
this._userName,
|
this._userVerifier.call_begin_verification_for_user(serviceName,
|
||||||
this._cancellable,
|
this._userName,
|
||||||
Lang.bind(this, function(obj, result) {
|
this._cancellable,
|
||||||
try {
|
Lang.bind(this, function(obj, result) {
|
||||||
obj.call_begin_verification_for_user_finish(result);
|
try {
|
||||||
} catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
|
obj.call_begin_verification_for_user_finish(result);
|
||||||
return;
|
} catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
|
||||||
} catch(e) {
|
return;
|
||||||
this._reportInitError('Failed to start verification for user', e);
|
} catch(e) {
|
||||||
return;
|
this._reportInitError('Failed to start verification for user', e);
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this._hold.release();
|
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() {
|
_beginVerification: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user