mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
Merge pull request #2466 from overleaf/jel-sso-beta-dashboard
Beta testing SSO on the dashboard GitOrigin-RevId: 9899f0ed0212180fde40e9e19bfd53bccafa3e7a
This commit is contained in:
@@ -101,21 +101,29 @@ define(['base'], function(App) {
|
||||
UserAffiliationsDataService
|
||||
) {
|
||||
$scope.userEmails = []
|
||||
const _ssoAvailable = email => {
|
||||
if (!ExposedSettings.hasSamlFeature) return false
|
||||
if (!email.affiliation || !email.affiliation.institution) return false
|
||||
if (email.affiliation.institution.ssoEnabled) return true
|
||||
if (
|
||||
ExposedSettings.hasSamlBeta &&
|
||||
email.affiliation.institution.ssoBeta
|
||||
) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
$scope.showConfirmEmail = email => {
|
||||
if (ExposedSettings.emailConfirmationDisabled) {
|
||||
return false
|
||||
}
|
||||
if (!email.confirmedAt && !email.hide) {
|
||||
if (
|
||||
email.affiliation &&
|
||||
email.affiliation.institution &&
|
||||
email.affiliation.institution.ssoEnabled &&
|
||||
(ExposedSettings.hasSamlBeta || ExposedSettings.hasSamlFeature)
|
||||
) {
|
||||
if (_ssoAvailable(email)) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
for (let userEmail of Array.from($scope.userEmails)) {
|
||||
userEmail.hide = false
|
||||
|
||||
Reference in New Issue
Block a user