fix(通用模块): 未登入访问对应模块url时,报错Network Error
This commit is contained in:
parent
4fc707729a
commit
5f09ae7577
|
@ -3,6 +3,9 @@ import {getCurrentProjectID, getCurrentUser, getCurrentWorkspaceId} from "./toke
|
|||
|
||||
export function hasPermission(permission) {
|
||||
let user = getCurrentUser();
|
||||
if (!user || !user.groups) {
|
||||
return false;
|
||||
}
|
||||
let index = user.groups.findIndex(g => g.id === SUPER_GROUP);
|
||||
if (index !== -1) {
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue