Merge pull request #2216 from overleaf/jel-saml-beta-account-settings

Allow SAML beta testing on Account Settings

GitOrigin-RevId: 6a2c60a3cbab3d9d0cdcc72e23f5d75f7702f89c
This commit is contained in:
Jessica Lawshe 2019-10-09 07:58:27 -05:00 committed by sharelatex
parent 849f21fde3
commit 625b4c9339
3 changed files with 4 additions and 2 deletions

View file

@ -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,

View file

@ -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"

View file

@ -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) ||