mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-22 20:24:18 -04:00
[admin] add impersonate role
This commit is contained in:
parent
22a6c107fd
commit
c4c8b946be
@ -50,6 +50,7 @@
|
||||
'translations',
|
||||
'code',
|
||||
'org',
|
||||
'impersonate',
|
||||
],
|
||||
};
|
||||
},
|
||||
|
@ -663,7 +663,7 @@ router.get('/user/logout-universal', handleErrorAsync(async (req, res) => {
|
||||
}));
|
||||
|
||||
const canImpersonate = (req) => {
|
||||
return req.isGranted('*') || (
|
||||
return req.isGranted('*') || req.isGranted('impersonate') || (
|
||||
req.isGranted('users') && ['example@pronouns.page'].includes(req.params.email)
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user