mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-03 14:19:01 +02:00
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:
@@ -2,6 +2,7 @@ const { ObjectId } = require('mongodb')
|
||||
const _ = require('lodash')
|
||||
const { promisify } = require('util')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const { hasAdminAccess } = require('../Helpers/AdminAuthorizationHelper')
|
||||
|
||||
const ENGINE_TO_COMPILER_MAP = {
|
||||
latex_dvipdf: 'latex',
|
||||
@@ -165,7 +166,7 @@ function _addNumericSuffixToProjectName(name, allProjectNames, maxLength) {
|
||||
|
||||
function getAllowedImagesForUser(sessionUser) {
|
||||
const images = Settings.allowedImageNames || []
|
||||
if (sessionUser && sessionUser.isAdmin) {
|
||||
if (hasAdminAccess(sessionUser)) {
|
||||
return images
|
||||
} else {
|
||||
return images.filter(image => !image.adminOnly)
|
||||
|
||||
Reference in New Issue
Block a user