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,6 +381,7 @@ const ShellUserVerifier = new Lang.Class({
|
||||
|
||||
_startService: function(serviceName) {
|
||||
this._hold.acquire();
|
||||
if (this._userName) {
|
||||
this._userVerifier.call_begin_verification_for_user(serviceName,
|
||||
this._userName,
|
||||
this._cancellable,
|
||||
@ -396,6 +397,22 @@ const ShellUserVerifier = new Lang.Class({
|
||||
|
||||
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() {
|
||||
|
Loading…
Reference in New Issue
Block a user