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