mirror of https://github.com/certd/certd
parent
f97827ec76
commit
b2971cf5fb
|
@ -15,6 +15,9 @@ const util = {
|
|||
const permissionStore = usePermissionStore();
|
||||
const userPermissionList = permissionStore.getPermissions;
|
||||
return userPermissionList.some((permission: any) => {
|
||||
if (permission === "*") {
|
||||
return true;
|
||||
}
|
||||
return need.includes(permission);
|
||||
});
|
||||
},
|
||||
|
|
|
@ -112,6 +112,9 @@ export const useResourceStore = defineStore({
|
|||
filterChildrenByPermission(list: any, permissions: any) {
|
||||
const menus = list.filter((item: any) => {
|
||||
if (item?.meta?.permission) {
|
||||
if (permissions.includes("*")) {
|
||||
return true;
|
||||
}
|
||||
return permissions.includes(item.meta.permission);
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue