From 8f848925f6cdae0d96c355faa8acc2b0d45ab16c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 29 May 2018 03:00:04 +0300 Subject: [PATCH] authPrompt: Do not enable sensitivity if retries are disallowed Set the sensitivity of the UI according to the canRetry parameter and thus if no more logins are allowed don't take any input. Fixes #311 --- js/gdm/authPrompt.js | 4 ++-- js/gdm/util.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js index d9ec7eea8..a0a4a21d6 100644 --- a/js/gdm/authPrompt.js +++ b/js/gdm/authPrompt.js @@ -242,11 +242,11 @@ var AuthPrompt = new Lang.Class({ this.emit('prompted'); }, - _onVerificationFailed() { + _onVerificationFailed(userVerifier, canRetry) { this._queryingService = null; this.clear(); - this.updateSensitivity(true); + this.updateSensitivity(canRetry); this.setActorInDefaultButtonWell(null); this.verificationStatus = AuthPromptStatus.VERIFICATION_FAILED; }, diff --git a/js/gdm/util.js b/js/gdm/util.js index 75feb77d0..1c6150eda 100644 --- a/js/gdm/util.js +++ b/js/gdm/util.js @@ -565,7 +565,7 @@ var ShellUserVerifier = new Lang.Class({ } } - this.emit('verification-failed'); + this.emit('verification-failed', canRetry); }, _onConversationStopped(client, serviceName) {