mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-23 04:34:15 -04:00
Merge branch 'benjamin-perms' into 'main'
(admin) add community permission See merge request PronounsPage/PronounsPage!468
This commit is contained in:
commit
1a73ddf760
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<Page>
|
<Page>
|
||||||
<NotFound v-if="!$isGranted('users')" />
|
<NotFound v-if="!$isGranted('users') && !$isGranted('community')" />
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<p>
|
<p>
|
||||||
<nuxt-link to="/admin">
|
<nuxt-link to="/admin">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<Page>
|
<Page>
|
||||||
<NotFound v-if="!$isGranted('users')" />
|
<NotFound v-if="!$isGranted('users') && !isGranted('community')" />
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<p>
|
<p>
|
||||||
<nuxt-link to="/admin">
|
<nuxt-link to="/admin">
|
||||||
|
@ -78,7 +78,7 @@ router.get('/admin/list/footer', handleErrorAsync(async (req, res) => {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
router.get('/admin/users', handleErrorAsync(async (req, res) => {
|
router.get('/admin/users', handleErrorAsync(async (req, res) => {
|
||||||
if (!req.isGranted('users')) {
|
if (!req.isGranted('users') && !req.isGranted('community')) {
|
||||||
return res.status(401).json({ error: 'Unauthorised' });
|
return res.status(401).json({ error: 'Unauthorised' });
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,7 +216,7 @@ router.get('/admin/stats-public', handleErrorAsync(async (req, res) => {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
router.get('/admin/stats/users-chart/:locale', handleErrorAsync(async (req, res) => {
|
router.get('/admin/stats/users-chart/:locale', handleErrorAsync(async (req, res) => {
|
||||||
if (!req.isGranted('users')) {
|
if (!req.isGranted('users') && !req.isGranted('community')) {
|
||||||
return res.status(401).json({ error: 'Unauthorised' });
|
return res.status(401).json({ error: 'Unauthorised' });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user