Chromium Code Reviews| 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 69c5eafe3dbb55e5b6523da09c79a181a2be8fd0..5ef7405212fe30a08bf3aaf1aab7735534f5286f 100644 |
| --- a/ui/login/account_picker/screen_account_picker.js |
| +++ b/ui/login/account_picker/screen_account_picker.js |
| @@ -224,15 +224,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 which 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 their is at least one user who has PIN |
|
jdufault
2016/10/21 22:27:41
Disable pin => Disable PIN
for users which => for
sammiequon
2016/10/21 23:48:43
Done.
|
| + // enabled. |
| + this.disablePinKeyboardForUser(user.username); |
| } |
| } |
| }, |
| @@ -249,7 +256,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); |
| }, |
| /** |