Kaynağa Gözat

SAML feature by special link

Allows for testing SAML linking before release

GitOrigin-RevId: 8a8c01aa15f04ba1749e93f4feadb7bf1643c783
Jessica Lawshe 7 yıl önce
ebeveyn
işleme
ae423b5800

+ 5 - 2
services/web/app/src/Features/User/UserPagesController.js

@@ -22,7 +22,8 @@ const UserPagesController = {
       title: 'register',
       sharedProjectData,
       newTemplateData,
-      new_email: req.query.new_email || ''
+      new_email: req.query.new_email || '',
+      samlBeta: req.session.samlBeta
     })
   },
 
@@ -79,7 +80,8 @@ const UserPagesController = {
     }
     res.render('user/login', {
       title: 'login',
-      email: req.query.email
+      email: req.query.email,
+      samlBeta: req.session.samlBeta
     })
   },
 
@@ -145,6 +147,7 @@ const UserPagesController = {
         samlInitPath: _.get(Settings, ['saml', 'ukamf', 'initPath']),
         institutionLinked,
         institutionNotLinked,
+        samlBeta: req.session.samlBeta,
         ssoError: ssoError,
         thirdPartyIds: UserPagesController._restructureThirdPartyIds(user)
       })

+ 1 - 1
services/web/app/views/user/settings/user-affiliations.pug

@@ -92,7 +92,7 @@ form.row(
 							i.fa.fa-fw.fa-trash(aria-hidden="true")
 							span.sr-only #{translate("remove")}
 				tr.affiliations-table-saml-row(ng-repeat-end ng-if="userEmail.affiliation && userEmail.affiliation && userEmail.affiliation.institution.ssoEnabled")
-					if hasFeature('saml')
+					if hasFeature('saml') || samlBeta
 						td
 						td(ng-attr-colspan="{{userEmail.samlProviderId ? '2' : '1'}}" ng-class="institutionAlreadyLinked(userEmail) ? '' : 'with-border'")
 							p.small(ng-if="userEmail.samlProviderId")