[gnome-shell] ShellUserVerifier: Add method to check if the service name is fingerprint
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] ShellUserVerifier: Add method to check if the service name is fingerprint
- Date: Mon, 15 Feb 2021 17:05:27 +0000 (UTC)
commit f7685dc224bb288e5fecb178aaccdedeac07923f
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Mon Feb 8 17:07:45 2021 +0100
ShellUserVerifier: Add method to check if the service name is fingerprint
We have multiple places where we check if we're handling a fingerprint
event, so let's add a common public function so that it can be used also
by the authPrompt.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1652>
js/gdm/util.js | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/js/gdm/util.js b/js/gdm/util.js
index a98d63509b..c53fbd2176 100644
--- a/js/gdm/util.js
+++ b/js/gdm/util.js
@@ -474,6 +474,11 @@ var ShellUserVerifier = class {
return serviceName == this._defaultService;
}
+ serviceIsFingerprint(serviceName) {
+ return this._fingerprintReaderType !== FingerprintReaderType.NONE &&
+ serviceName === FINGERPRINT_SERVICE_NAME;
+ }
+
_updateDefaultService() {
if (this._settings.get_boolean(PASSWORD_AUTHENTICATION_KEY))
this._defaultService = PASSWORD_SERVICE_NAME;
@@ -527,8 +532,7 @@ var ShellUserVerifier = class {
_onInfo(client, serviceName, info) {
if (this.serviceIsForeground(serviceName)) {
this._queueMessage(info, MessageType.INFO);
- } else if (serviceName == FINGERPRINT_SERVICE_NAME &&
- this._fingerprintReaderType !== FingerprintReaderType.NONE) {
+ } else if (this.serviceIsFingerprint(serviceName)) {
// We don't show fingerprint messages directly since it's
// not the main auth service. Instead we use the messages
// as a cue to display our own message.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]