fetching the profile should error normally
This commit is contained in:
@@ -46,11 +46,6 @@ function create() {
|
||||
error = e;
|
||||
}
|
||||
|
||||
if (error || result.status !== 200) {
|
||||
console.error('Failed to get profile.', error || result.status);
|
||||
return [];
|
||||
}
|
||||
|
||||
if (error || result.status !== 200) return [error || result];
|
||||
|
||||
result.body.isAtLeastUserManager = [ ROLES.OWNER, ROLES.ADMIN, ROLES.MAIL_MANAGER, ROLES.USER_MANAGER ].indexOf(result.body.role) !== -1;
|
||||
|
||||
Reference in New Issue
Block a user