(trans) role "code" should also be allowed to see /admin/translations

This commit is contained in:
Andrea Vos 2024-02-26 16:14:09 +00:00
parent 2628f0f25c
commit a98e9f00a1
3 changed files with 4 additions and 4 deletions

View File

@ -239,4 +239,4 @@
"trigender": 0.5
},
"diff": {}
}
}

View File

@ -1,6 +1,6 @@
<template>
<Page wide>
<NotFound v-if="!$isGranted('translations')" />
<NotFound v-if="!$isGranted('translations') && !$isGranted('code')" />
<div v-else>
<p>
<nuxt-link to="/admin">

View File

@ -51,7 +51,7 @@ router.post('/translations/propose', handleErrorAsync(async (req, res) => {
}));
router.get('/translations/proposals', handleErrorAsync(async (req, res) => {
if (!req.isGranted('translations')) {
if (!req.isGranted('translations') && !req.isGranted('code')) {
return res.status(401).json({ error: 'Unauthorised' });
}
@ -135,7 +135,7 @@ router.post('/translations/proposals-done', handleErrorAsync(async (req, res) =>
}));
router.get('/translations/contributors', handleErrorAsync(async (req, res) => {
if (!req.isGranted('translations')) {
if (!req.isGranted('translations') && !req.isGranted('code')) {
return res.status(401).json({ error: 'Unauthorised' });
}