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..c2cf478d66885cca1909f0a7713d1868e7a9c3f0 100644 |
| --- a/ui/login/account_picker/screen_account_picker.js |
| +++ b/ui/login/account_picker/screen_account_picker.js |
| @@ -224,15 +224,20 @@ 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 allowed to use PIN unlock. |
|
jdufault
2016/10/19 22:13:25
nit: who are not*
sammiequon
2016/10/20 16:50:00
Done.
|
| * @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(); |
|
jdufault
2016/10/19 22:13:25
I wonder if calling this multiple times will cause
sammiequon
2016/10/20 16:50:00
Done.
|
| - return; |
| + } else { |
| + // Disable pin for users which should not be able to access pin. Such |
| + // users include those who have not set up pin as those who have not |
| + // entered their password recently. |
| + this.disablePinKeyboardForUser(user.username); |
| } |
| } |
| }, |
| @@ -249,7 +254,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); |
| }, |
| /** |