mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-11-29 18:48:13 +08:00
fix(通用模块): 未登入访问对应模块url时,报错Network Error
This commit is contained in:
parent
da9fa08cae
commit
dadf5fc7fb
@ -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
Block a user