Commit 36f182b4 authored by Roman Sorokin's avatar Roman Sorokin Committed by Commit Bot

cros: Show overlay during 3rd-party SAML Enrollment.

* Show overlay for the 3rd-party SAML page.
* Hide bottom buttons for the 3rd-party SAML page.

Unfortunately my refactoring CL:2046174 is still in-flight. So I
followed the model from CL:2000938 in the meantime. As this is needed
for M82.

Fixed: 1001281
Change-Id: Ia8f2d8cbabb2f44e387ad5f76b6a83997654ae9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2089734Reviewed-by: default avatarDenis Kuznetsov [CET] <antrim@chromium.org>
Reviewed-by: default avatarMaksim Ivanov <emaxx@chromium.org>
Commit-Queue: Roman Sorokin [CET] <rsorokin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747307}
parent dbb9b49f
...@@ -6,14 +6,6 @@ ...@@ -6,14 +6,6 @@
padding: 0; padding: 0;
} }
:host(.saml) #oauth-enroll-step-contents {
padding-top: 44px;
}
:host(:not(.saml)) #oauth-saml-notice-container {
display: none;
}
#oauth-enroll-step-contents, #oauth-enroll-step-contents,
#oauth-enroll-step-contents > div { #oauth-enroll-step-contents > div {
height: 100%; height: 100%;
...@@ -32,11 +24,8 @@ ...@@ -32,11 +24,8 @@
#oauth-enroll-auth-view { #oauth-enroll-auth-view {
display: block; display: block;
height: 100%;
overflow: hidden; overflow: hidden;
padding: 0; position: static;
width: 100%;
z-index: 10;
} }
#oauth-enroll-learn-more-link { #oauth-enroll-learn-more-link {
...@@ -55,21 +44,13 @@ ...@@ -55,21 +44,13 @@
vertical-align: top; vertical-align: top;
} }
.oauth-enroll-button {
display: none;
}
#oauth-saml-notice-container { #oauth-saml-notice-container {
align-items: center; align-items: center;
background: rgb(241, 243, 244); /* #F1F3F4 */
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.17); box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.17);
display: flex; display: flex;
height: 44px; height: 44px;
justify-content: center;
left: 0;
min-height: 0; min-height: 0;
position: absolute;
right: 0;
top: 0;
} }
#oauth-saml-notice-message { #oauth-saml-notice-message {
...@@ -93,3 +74,12 @@ ...@@ -93,3 +74,12 @@
top: 0; top: 0;
z-index: 1; z-index: 1;
} }
#signin-frame-container {
z-index: 10;
}
#saml-close-button {
--cr-icon-button-margin-end: 0;
--cr-icon-button-margin-start: 0;
}
...@@ -17,10 +17,21 @@ ...@@ -17,10 +17,21 @@
<!-- OATH GAIA DIALOG --> <!-- OATH GAIA DIALOG -->
<div id="step-signin" hidden$="[[!eq_(currentStep_, 'signin')]]"> <div id="step-signin" hidden$="[[!eq_(currentStep_, 'signin')]]">
<oobe-dialog class="gaia-dialog" role="dialog" <oobe-dialog class="gaia-dialog" role="dialog"
id="enrollment-gaia-dialog" has-buttons no-header id="enrollment-gaia-dialog" no-header
has-buttons="[[!isSamlSsoVisible_]]"
no-footer-padding footer-shrinkable> no-footer-padding footer-shrinkable>
<div slot="footer" class="flex layout vertical"> <div slot="footer" id="signin-frame-container"
<webview id="oauth-enroll-auth-view" class="flex layout vertical">
<div id="oauth-saml-notice-container" class="layout horizontal"
hidden="[[!isSamlSsoVisible_]]">
<div class="flex layout horizontal center-justified">
<span id="oauth-saml-notice-message"></span>
</div>
<cr-icon-button id="saml-close-button" iron-icon="cr:close"
on-click="cancel">
</cr-icon-button>
</div>
<webview id="oauth-enroll-auth-view" class="flex"
name="oauth-enroll-auth-view"> name="oauth-enroll-auth-view">
</webview> </webview>
</div> </div>
...@@ -196,14 +207,12 @@ ...@@ -196,14 +207,12 @@
</oobe-dialog> </oobe-dialog>
</div> </div>
</div> </div>
<div id="oauth-saml-notice-container">
<span id="oauth-saml-notice-message"></span>
</div>
<navigation-bar id="oauth-enroll-navigation" <navigation-bar id="oauth-enroll-navigation"
disabled="[[authenticatorDialogDisplayed_]]" disabled="[[authenticatorDialogDisplayed_]]"
on-close="cancel" on-refresh="cancel"></navigation-bar> on-close="cancel" on-refresh="cancel"></navigation-bar>
<div class="popup-overlay" <div class="popup-overlay"
hidden="[[!authenticatorDialogDisplayed_]]"> hidden="[[!showPopupOverlay_(authenticatorDialogDisplayed_,
isSamlSsoVisible_)]]">
</div> </div>
</template> </template>
</dom-module> </dom-module>
...@@ -137,6 +137,15 @@ Polymer({ ...@@ -137,6 +137,15 @@ Polymer({
type: Boolean, type: Boolean,
value: false, value: false,
}, },
/**
* Whether the SAML SSO page is visible.
* @private
*/
isSamlSsoVisible_: {
type: Boolean,
value: false,
},
}, },
/** /**
...@@ -246,7 +255,7 @@ Polymer({ ...@@ -246,7 +255,7 @@ Polymer({
'samlNotice', 'samlNotice',
this.authenticator_.authDomain); this.authenticator_.authDomain);
} }
this.classList.toggle('saml', isSAML); this.isSamlSsoVisible_ = isSAML;
if (Oobe.getInstance().currentScreen == this) if (Oobe.getInstance().currentScreen == this)
Oobe.getInstance().updateScreenSize(this); Oobe.getInstance().updateScreenSize(this);
this.lastBackMessageValue_ = false; this.lastBackMessageValue_ = false;
...@@ -310,7 +319,7 @@ Polymer({ ...@@ -310,7 +319,7 @@ Polymer({
this.authenticator_.setWebviewPartition(data.webviewPartitionName); this.authenticator_.setWebviewPartition(data.webviewPartitionName);
this.classList.remove('saml'); this.isSamlSsoVisible_ = false;
var gaiaParams = {}; var gaiaParams = {};
gaiaParams.gaiaUrl = data.gaiaUrl; gaiaParams.gaiaUrl = data.gaiaUrl;
...@@ -621,4 +630,14 @@ Polymer({ ...@@ -621,4 +630,14 @@ Polymer({
this.showStep(ENROLLMENT_STEP.AD_JOIN); this.showStep(ENROLLMENT_STEP.AD_JOIN);
}, },
/**
* Whether to show popup overlay under the dialog
* @param {boolean} authenticatorDialogDisplayed
* @param {boolean} isSamlSsoVisible
* @return {boolean} True iff overlay popup should be displayed
* @private
*/
showPopupOverlay_(authenticatorDialogDisplayed, isSamlSsoVisible) {
return authenticatorDialogDisplayed || isSamlSsoVisible;
},
}); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment