| Index: chrome/browser/resources/login/user_pod_row.js
|
| diff --git a/chrome/browser/resources/login/user_pod_row.js b/chrome/browser/resources/login/user_pod_row.js
|
| index 51b538a424b78777184c4d7cad65821dd7b8ac5c..d7fc01faa63f784fd0f189ec2c59442484135939 100644
|
| --- a/chrome/browser/resources/login/user_pod_row.js
|
| +++ b/chrome/browser/resources/login/user_pod_row.js
|
| @@ -363,6 +363,14 @@ cr.define('login', function() {
|
| },
|
|
|
| /**
|
| + * Gets user type bubble like multi-profiles policy restriction message.
|
| + * @type {!HTMLDivElement}
|
| + */
|
| + get userTypeBubbleElement() {
|
| + return this.querySelector('.user-type-bubble');
|
| + },
|
| +
|
| + /**
|
| * Gets user type icon.
|
| * @type {!HTMLDivElement}
|
| */
|
| @@ -525,12 +533,9 @@ cr.define('login', function() {
|
| },
|
|
|
| customizeUserPodPerUserType: function() {
|
| - var isMultiProfilesUI =
|
| - (Oobe.getInstance().displayType == DISPLAY_TYPE.USER_ADDING);
|
| -
|
| if (this.user_.locallyManagedUser && !this.user_.isDesktopUser) {
|
| this.setUserPodIconType('supervised');
|
| - } else if (isMultiProfilesUI && !this.user_.isMultiProfilesAllowed) {
|
| + } else if (this.multiProfilesPolicyApplied) {
|
| // Mark user pod as not focusable which in addition to the grayed out
|
| // filter makes it look in disabled state.
|
| this.classList.add('not-focusable');
|
| @@ -567,6 +572,17 @@ cr.define('login', function() {
|
| },
|
|
|
| /**
|
| + * Returns true if multi-profiles sign in is currently active and this
|
| + * user pod is restricted per policy.
|
| + * @type {boolean}
|
| + */
|
| + get multiProfilesPolicyApplied() {
|
| + var isMultiProfilesUI =
|
| + (Oobe.getInstance().displayType == DISPLAY_TYPE.USER_ADDING);
|
| + return isMultiProfilesUI && !this.user_.isMultiProfilesAllowed;
|
| + },
|
| +
|
| + /**
|
| * Gets main input element.
|
| * @type {(HTMLButtonElement|HTMLInputElement)}
|
| */
|
| @@ -622,6 +638,8 @@ cr.define('login', function() {
|
| this.actionBoxAreaElement.classList.add('hovered');
|
| this.classList.add('hovered');
|
| } else {
|
| + if (this.multiProfilesPolicyApplied)
|
| + this.userTypeBubbleElement.classList.remove('bubble-shown');
|
| this.actionBoxAreaElement.classList.remove('hovered');
|
| this.classList.remove('hovered');
|
| }
|
| @@ -752,6 +770,11 @@ cr.define('login', function() {
|
| if (this.user.locallyManagedUser && !this.user.isDesktopUser) {
|
| this.showSupervisedUserSigninWarning();
|
| } else {
|
| + // Special case for multi-profiles sign in. We show users even if they
|
| + // are not allowed per policy. Restrict those users from starting GAIA.
|
| + if (this.multiProfilesPolicyApplied)
|
| + return;
|
| +
|
| this.parentNode.showSigninUI(this.user.emailAddress);
|
| }
|
| },
|
| @@ -898,6 +921,9 @@ cr.define('login', function() {
|
| this.parentNode.setActivatedPod(this);
|
| }
|
|
|
| + if (this.multiProfilesPolicyApplied)
|
| + this.userTypeBubbleElement.classList.add('bubble-shown');
|
| +
|
| // Prevent default so that we don't trigger 'focus' event.
|
| e.preventDefault();
|
| }
|
| @@ -1963,6 +1989,9 @@ cr.define('login', function() {
|
| */
|
| focusPod: function(podToFocus, opt_force) {
|
| if (this.isFocused(podToFocus) && !opt_force) {
|
| + // Calling focusPod w/o podToFocus means reset.
|
| + if (!podToFocus)
|
| + Oobe.clearErrors();
|
| this.keyboardActivated_ = false;
|
| return;
|
| }
|
|
|