bruh
This commit is contained in:
parent
908a72daf9
commit
9d9e80a854
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ let backendProxy = async ({route, backendParams}) => {
|
||||||
if ((!user || user == '') && AUTH_ACTIONS.indexOf(route) != -1) return {'success': 'Not authorized.' };
|
if ((!user || user == '') && AUTH_ACTIONS.indexOf(route) != -1) return {'success': 'Not authorized.' };
|
||||||
3
|
3
|
||||||
var isAdmin = false;
|
var isAdmin = false;
|
||||||
if (user && user != '') isAdmin = (await userRoles({user})).indexOf('Admin') != -1;
|
if (user && user != '') isAdmin = ((await userRoles({user})) || []).indexOf('Admin') != -1;
|
||||||
|
|
||||||
backendParams['admin'] = isAdmin;
|
backendParams['admin'] = isAdmin;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue