diff --git a/services/web/app/src/infrastructure/ExpressLocals.js b/services/web/app/src/infrastructure/ExpressLocals.js index e91d1b6e35..bbaefeed69 100644 --- a/services/web/app/src/infrastructure/ExpressLocals.js +++ b/services/web/app/src/infrastructure/ExpressLocals.js @@ -530,6 +530,7 @@ module.exports = function(app, webRouter, privateApiRouter, publicApiRouter) { res.locals.ExposedSettings = { isOverleaf: Settings.overleaf != null, appName: Settings.appName, + hasSamlBeta: req.session.samlBeta, hasSamlFeature: Features.hasFeature('saml'), samlInitPath: lodash.get(Settings, ['saml', 'ukamf', 'initPath']), siteUrl: Settings.siteUrl, diff --git a/services/web/app/views/user/settings/user-affiliations.pug b/services/web/app/views/user/settings/user-affiliations.pug index 3211ac6855..d01695e51c 100644 --- a/services/web/app/views/user/settings/user-affiliations.pug +++ b/services/web/app/views/user/settings/user-affiliations.pug @@ -137,7 +137,7 @@ form.row( input-type="email" input-required="true" ) - if hasFeature('saml') + if hasFeature('saml') || samlBeta td( colspan="2" ng-if="newAffiliation && newAffiliation.university && newAffiliation.university.ssoEnabled" diff --git a/services/web/public/src/main/affiliations/controllers/UserAffiliationsController.js b/services/web/public/src/main/affiliations/controllers/UserAffiliationsController.js index c7ef0e82b6..f122ad33ed 100644 --- a/services/web/public/src/main/affiliations/controllers/UserAffiliationsController.js +++ b/services/web/public/src/main/affiliations/controllers/UserAffiliationsController.js @@ -28,11 +28,12 @@ define(['base'], App => $scope.closeInstitutionNotification = type => { $scope.hideInstitutionNotifications[type] = true } + $scope.hasSamlBeta = ExposedSettings.hasSamlBeta $scope.hasSamlFeature = ExposedSettings.hasSamlFeature $scope.samlInitPath = ExposedSettings.samlInitPath $scope.shouldShowRolesAndAddEmailButton = () => { const newAffiliation = $scope.newAffiliation - const hasSamlFeature = $scope.hasSamlFeature + const hasSamlFeature = $scope.hasSamlFeature || $scope.hasSamlBeta return ( !newAffiliation || (newAffiliation && !newAffiliation.university) ||