mirror of
https://github.com/certd/certd.git
synced 2026-04-23 19:57:27 +08:00
🔱: [client] sync upgrade with 2 commits [trident-sync]
chore:
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user