From 280dde15d6308f443ea08de26df137cb4860046b Mon Sep 17 00:00:00 2001 From: M Fahru Date: Wed, 9 Aug 2023 13:57:19 -0700 Subject: [PATCH] Show admin email in enrollment page accessed via dashboard notification and email invitation. GitOrigin-RevId: 4589a276a1b7db2ba0a5da2c06bde797ba8d0b65 --- .../src/Features/Subscription/TeamInvitesController.js | 9 +++++++++ .../web/app/views/subscriptions/team/invite-managed.pug | 1 + services/web/locales/en.json | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/services/web/app/src/Features/Subscription/TeamInvitesController.js b/services/web/app/src/Features/Subscription/TeamInvitesController.js index 7c25d17de5..85a22ff7c0 100644 --- a/services/web/app/src/Features/Subscription/TeamInvitesController.js +++ b/services/web/app/src/Features/Subscription/TeamInvitesController.js @@ -100,11 +100,20 @@ async function viewInvite(req, res, next) { subscription, }) + let currentManagedUserAdminEmail + try { + currentManagedUserAdminEmail = + await SubscriptionLocator.promises.getAdminEmail(subscription._id) + } catch (err) { + logger.error({ err }, 'error getting subscription admin email') + } + return res.render('subscriptions/team/invite-managed', { inviterName: invite.inviterName, inviteToken: invite.token, expired: req.query.expired, validationStatus: Object.fromEntries(validationStatus), + currentManagedUserAdminEmail, }) } else { let currentManagedUserAdminEmail diff --git a/services/web/app/views/subscriptions/team/invite-managed.pug b/services/web/app/views/subscriptions/team/invite-managed.pug index 29b6ec61e3..79d8ded84c 100644 --- a/services/web/app/views/subscriptions/team/invite-managed.pug +++ b/services/web/app/views/subscriptions/team/invite-managed.pug @@ -9,6 +9,7 @@ block append meta meta(name="ol-expired" data-type="boolean" content=expired) meta(name="ol-alreadyEnrolled" data-type="boolean" content=alreadyEnrolled) meta(name="ol-validationStatus" data-type="json" content=validationStatus) + meta(name="ol-currentManagedUserAdminEmail" data-type="string" content=currentManagedUserAdminEmail) block content main.content.content-alt.team-invite#invite-managed-root diff --git a/services/web/locales/en.json b/services/web/locales/en.json index 66f1191451..0bca93b6d8 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -694,7 +694,7 @@ "group_admins_get_access_to": "Group admins get access to", "group_admins_get_access_to_info": "Special features available only on group plans.", "group_full": "This group is already full", - "group_managed_by_group_administrator": "This group is managed by the group administrator", + "group_managed_by_group_administrator": "This group is managed by the group administrator (__admin__)", "group_members_and_collaborators_get_access_to": "Group members and their project collaborators get access to", "group_members_and_collaborators_get_access_to_info": "These features are available to group members and their collaborators (other Overleaf users invited to projects owned a group member).", "group_members_get_access_to": "Group members get access to",