Merge pull request #6614 from overleaf/jpa-msm-separate-admin-app

[misc] move admin capability from www. to admin. subdomain

GitOrigin-RevId: e0daeacf3c06b856ffb9fd35dce76e71f14e8459
This commit is contained in:
Jakob Ackermann
2022-04-05 12:18:24 +00:00
committed by Copybot
parent c96fbc526e
commit e82a053c85
25 changed files with 223 additions and 20 deletions
@@ -133,8 +133,7 @@ async function ensureUserCanAdminProject(req, res, next) {
async function ensureUserIsSiteAdmin(req, res, next) {
const userId = _getUserId(req)
const isAdmin = await AuthorizationManager.promises.isUserSiteAdmin(userId)
if (isAdmin) {
if (await AuthorizationManager.promises.isUserSiteAdmin(userId)) {
logger.log({ userId }, 'allowing user admin access to site')
return next()
}