mirror of
https://github.com/certd/certd.git
synced 2026-04-24 04:17:25 +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 permissionStore = usePermissionStore();
|
||||||
const userPermissionList = permissionStore.getPermissions;
|
const userPermissionList = permissionStore.getPermissions;
|
||||||
return userPermissionList.some((permission: any) => {
|
return userPermissionList.some((permission: any) => {
|
||||||
|
if (permission === "*") {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return need.includes(permission);
|
return need.includes(permission);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -112,6 +112,9 @@ export const useResourceStore = defineStore({
|
|||||||
filterChildrenByPermission(list: any, permissions: any) {
|
filterChildrenByPermission(list: any, permissions: any) {
|
||||||
const menus = list.filter((item: any) => {
|
const menus = list.filter((item: any) => {
|
||||||
if (item?.meta?.permission) {
|
if (item?.meta?.permission) {
|
||||||
|
if (permissions.includes("*")) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return permissions.includes(item.meta.permission);
|
return permissions.includes(item.meta.permission);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user