From fffd6c1b7d7d4e1339490b84304801eac1dfa1eb Mon Sep 17 00:00:00 2001 From: Jemma Poffinbarger Date: Mon, 29 Jul 2024 15:53:01 -0500 Subject: [PATCH] fix: fixed copy paste error with access level on admin community pages --- src/services/juxt-web/routes/admin/admin.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/services/juxt-web/routes/admin/admin.js b/src/services/juxt-web/routes/admin/admin.js index b7a6a0b..e46c0fb 100644 --- a/src/services/juxt-web/routes/admin/admin.js +++ b/src/services/juxt-web/routes/admin/admin.js @@ -160,7 +160,7 @@ router.put('/:reportID', async function (req, res) { }); router.get('/communities', async function (req, res) { - if (!req.moderator) { + if (!req.developer) { return res.redirect('/titles/show'); } @@ -185,7 +185,7 @@ router.get('/communities', async function (req, res) { }); router.get('/communities/new', async function (req, res) { - if (!req.moderator) { + if (!req.developer) { return res.redirect('/titles/show'); } @@ -281,6 +281,9 @@ router.post('/communities/:id', upload.fields([{name: 'browserIcon', maxCount: 1 name: 'CTRbrowserHeader', maxCount: 1 }, {name: 'WiiUbrowserHeader', maxCount: 1}]), async (req, res) => { + if (!req.developer) { + return res.redirect('/titles/show'); + } JSON.parse(JSON.stringify(req.files)); const communityID = req.params.id; let tgaIcon;