Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Unified Diff: ui/login/account_picker/screen_account_picker.js

Issue 2458763002: cros: Fixed 3 bugs for pin unlock. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/chromeos/login/lock.js ('k') | ui/login/account_picker/user_pod_row.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/login/account_picker/screen_account_picker.js
diff --git a/ui/login/account_picker/screen_account_picker.js b/ui/login/account_picker/screen_account_picker.js
index 6d4b8d5cd2a20d37355537476b02c5b7cf19efe9..262b23ef2b3d94334e271c975c33a9f3f03b2b68 100644
--- a/ui/login/account_picker/screen_account_picker.js
+++ b/ui/login/account_picker/screen_account_picker.js
@@ -216,15 +216,22 @@ login.createScreen('AccountPickerScreen', 'account-picker', function() {
},
/**
- * Loads the PIN keyboard if any of the users can login with a PIN.
+ * Loads the PIN keyboard if any of the users can login with a PIN. Disables
+ * the PIN keyboard for users who are not allowed to use PIN unlock.
* @param {array} users Array of user instances.
*/
- loadPinKeyboardIfNeeded_: function(users) {
+ initializePinKeyboardStateForUsers_: function(users) {
for (var i = 0; i < users.length; ++i) {
var user = users[i];
if (user.showPin) {
showPinKeyboardAsync();
- return;
+ } else {
+ // Disable pin for users who cannot authenticate with PIN. For
+ // example, users who have not set up PIN or users who have not
+ // entered their account recently. Otherwise, the PIN keyboard will
+ // will appear for any user if there is at least one user who has PIN
+ // enabled.
+ this.disablePinKeyboardForUser(user.username);
}
}
},
@@ -241,7 +248,7 @@ login.createScreen('AccountPickerScreen', 'account-picker', function() {
if (Oobe.getInstance().displayType == DISPLAY_TYPE.DESKTOP_USER_MANAGER)
$('login-header-bar').classList.toggle('shadow', users.length > 8);
- this.loadPinKeyboardIfNeeded_(users);
+ this.initializePinKeyboardStateForUsers_(users);
},
/**
« no previous file with comments | « chrome/browser/resources/chromeos/login/lock.js ('k') | ui/login/account_picker/user_pod_row.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698