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


(cherry picked from commit 8f848925f6)
This commit is contained in:
Marco Trevisan (Treviño) 2018-05-29 00:00:04 +00:00 committed by Marco Trevisan
parent bf318df7f3
commit df1b46eee2
2 changed files with 3 additions and 3 deletions

View File

@ -242,11 +242,11 @@ var AuthPrompt = new Lang.Class({
this.emit('prompted'); this.emit('prompted');
}, },
_onVerificationFailed() { _onVerificationFailed(userVerifier, canRetry) {
this._queryingService = null; this._queryingService = null;
this.clear(); this.clear();
this.updateSensitivity(true); this.updateSensitivity(canRetry);
this.setActorInDefaultButtonWell(null); this.setActorInDefaultButtonWell(null);
this.verificationStatus = AuthPromptStatus.VERIFICATION_FAILED; this.verificationStatus = AuthPromptStatus.VERIFICATION_FAILED;
}, },

View File

@ -562,7 +562,7 @@ var ShellUserVerifier = new Lang.Class({
} }
} }
this.emit('verification-failed'); this.emit('verification-failed', canRetry);
}, },
_onConversationStopped(client, serviceName) { _onConversationStopped(client, serviceName) {