[admin] add impersonate role

This commit is contained in:
Andrea Vos 2023-03-27 07:40:31 +02:00
parent 22a6c107fd
commit c4c8b946be
2 changed files with 2 additions and 1 deletions

View File

@ -50,6 +50,7 @@
'translations',
'code',
'org',
'impersonate',
],
};
},

View File

@ -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)
);
}