[gnome-shell] gdm: Pass source serviceName to verification failures
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] gdm: Pass source serviceName to verification failures
- Date: Fri, 12 Feb 2021 20:29:37 +0000 (UTC)
commit 85ad1157dfe323d62060a2d2fa31cf0b0c092b20
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Mon Feb 1 19:36:49 2021 +0100
gdm: Pass source serviceName to verification failures
Depending on the service name we got the failure from we could react
differently, so let's pass the value to the verification failure
handler.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1622>
js/gdm/util.js | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/js/gdm/util.js b/js/gdm/util.js
index 320d2f826c..15f8de0fe0 100644
--- a/js/gdm/util.js
+++ b/js/gdm/util.js
@@ -379,12 +379,12 @@ var ShellUserVerifier = class {
}
}
- _reportInitError(where, error) {
+ _reportInitError(where, error, serviceName) {
logError(error, where);
this._hold.release();
this._queueMessage(_("Authentication error"), MessageType.ERROR);
- this._verificationFailed(false);
+ this._verificationFailed(serviceName, false);
}
async _openReauthenticationChannel(userName) {
@@ -508,7 +508,8 @@ var ShellUserVerifier = class {
}
this._reportInitError(this._userName
? 'Failed to start %s verification for user'.format(serviceName)
- : 'Failed to start %s verification'.format(serviceName), e);
+ : 'Failed to start %s verification'.format(serviceName), e,
+ serviceName);
return;
}
this._hold.release();
@@ -595,7 +596,7 @@ var ShellUserVerifier = class {
this.begin(this._userName, new Batch.Hold());
}
- _verificationFailed(retry) {
+ _verificationFailed(serviceName, retry) {
// For Not Listed / enterprise logins, immediately reset
// the dialog
// Otherwise, when in login mode we allow ALLOWED_FAILURES attempts.
@@ -645,7 +646,7 @@ var ShellUserVerifier = class {
if (foregroundService) {
this._credentialManagers[foregroundService].token = null;
this._preemptingService = null;
- this._verificationFailed(false);
+ this._verificationFailed(serviceName, false);
return;
}
@@ -653,7 +654,7 @@ var ShellUserVerifier = class {
// But if, e.g., fingerprint fails, still give
// password authentication a chance to succeed
if (this.serviceIsForeground(serviceName))
- this._verificationFailed(true);
+ this._verificationFailed(serviceName, true);
}
};
Signals.addSignalMethods(ShellUserVerifier.prototype);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]