mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #3629 from overleaf/jel-ui-reconfirm-dash
Show reconfirm notification on the dash GitOrigin-RevId: 4640513a299853a63c5f36b3e11b41ee66af61de
This commit is contained in:
parent
ddb6163b65
commit
54c471bc1c
4 changed files with 21 additions and 3 deletions
|
@ -1,3 +1,4 @@
|
|||
const _ = require('lodash')
|
||||
const Path = require('path')
|
||||
const OError = require('@overleaf/o-error')
|
||||
const fs = require('fs')
|
||||
|
@ -476,7 +477,9 @@ const ProjectController = {
|
|||
}
|
||||
|
||||
// Institution SSO Notifications
|
||||
let reconfirmedViaSAML
|
||||
if (Features.hasFeature('saml')) {
|
||||
reconfirmedViaSAML = _.get(req.session, ['saml', 'reconfirmed'])
|
||||
const samlSession = req.session.saml
|
||||
// Notification: SSO Available
|
||||
const linkedInstitutionIds = []
|
||||
|
@ -581,6 +584,7 @@ const ProjectController = {
|
|||
userAffiliations,
|
||||
userEmails,
|
||||
hasSubscription: results.hasSubscription,
|
||||
reconfirmedViaSAML,
|
||||
zipFileSizeLimit: Settings.maxUploadSize
|
||||
}
|
||||
|
||||
|
|
|
@ -10,8 +10,7 @@ mixin reconfirmAffiliationNotification(location)
|
|||
ng-disabled="ui.isMakingRequest"
|
||||
) #{translate("confirm_affiliation")}
|
||||
|
||||
| !{translate("are_you_still_at", {institutionName: '{{userEmail.affiliation.institution.name}}'}, ['strong'])}
|
||||
|
|
||||
| !{translate("are_you_still_at", {institutionName: '{{userEmail.affiliation.institution.name}}'}, ['strong'])}
|
||||
|
||||
if location == '/user/settings'
|
||||
| !{translate('please_reconfirm_institutional_email', {}, [{ name: 'span' }])}
|
||||
|
|
|
@ -5,7 +5,7 @@ block vars
|
|||
|
||||
block content
|
||||
script#data(type="application/json").
|
||||
!{StringHelper.stringifyJsonForScript({ projects, tags, notifications, notificationsInstitution, userAffiliations, userEmails })}
|
||||
!{StringHelper.stringifyJsonForScript({ projects, tags, notifications, notificationsInstitution, userAffiliations, userEmails, allInReconfirmNotificationPeriods, reconfirmedViaSAML })}
|
||||
|
||||
script(type="text/javascript").
|
||||
window.data = JSON.parse(document.querySelector("#data").text);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
include ../../_mixins/reconfirm_affiliation
|
||||
|
||||
.user-notifications(ng-controller="NotificationsController")
|
||||
include ./unsupported-browser
|
||||
|
||||
|
@ -215,6 +217,19 @@
|
|||
div(ng-if="!userEmail.confirmationInflight && userEmail.error" aria-live="polite")
|
||||
| #{translate('generic_something_went_wrong')}
|
||||
|
||||
ui.list-unstyled(ng-controller="UserAffiliationsReconfirmController")
|
||||
li.notification-entry(
|
||||
ng-repeat="userEmail in allInReconfirmNotificationPeriods"
|
||||
)
|
||||
.alert.alert-info()
|
||||
+reconfirmAffiliationNotification('/project')
|
||||
|
||||
li.notification-entry(
|
||||
ng-repeat="userEmail in userEmails"
|
||||
ng-if="userEmail.samlIdentifier && userEmail.samlIdentifier.providerId === reconfirmedViaSAML"
|
||||
)
|
||||
+reconfirmedAffiliationNotification()
|
||||
|
||||
- var hasPaidAffiliation = userAffiliations.some(affiliation => affiliation.licence && affiliation.licence !== 'free')
|
||||
if settings.enableSubscriptions && !hasSubscription && !hasPaidAffiliation
|
||||
ul.list-unstyled(
|
||||
|
|
Loading…
Reference in a new issue