fix: update user's scope system role check
For all user, check system role by keystone system role api, remove the special username admin check Change-Id: I46b58b1061bd2914933f5eb2950f3e34ee34c437
This commit is contained in:
parent
f7fd48445f
commit
f172cb2164
@ -110,11 +110,8 @@ export class RootStore {
|
||||
}
|
||||
|
||||
async getUserSystemRoles(user) {
|
||||
// only user admin or system roles has admin/reader can go to administrator
|
||||
const { id, name } = user;
|
||||
if (name === 'admin') {
|
||||
return true;
|
||||
}
|
||||
// only scope system roles has admin/reader can go to administrator
|
||||
const { id } = user;
|
||||
try {
|
||||
const result = await client.keystone.systemUsers.roles.list(id);
|
||||
const { roles = [] } = result;
|
||||
|
Loading…
Reference in New Issue
Block a user