fixed loading issues of users without role

master
FlayInAHook 4 years ago
parent e2d0dd56c6
commit 9f1359e04f

@ -35,8 +35,12 @@ export class AuthService {
} }
if (value.user != undefined){ if (value.user != undefined){
let roles = []; let roles = [];
for (let role of value.user.roles){ if (value.user.roles.length !== 0 ){
roles.push(role.name);
for (let role of value.user.roles){
roles.push(role.name);
}
} }
value.user.rolesString = roles.join(', '); value.user.rolesString = roles.join(', ');
console.log("Getting user" + JSON.stringify(value)); console.log("Getting user" + JSON.stringify(value));

Loading…
Cancel
Save