lint
This commit is contained in:
parent
fb411c8fd3
commit
70767a1b24
|
|
@ -76,19 +76,14 @@ const dashboardRoutes = router.get("/getSidebarItems", async (c) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
//if menu has no children, check if permission match
|
//if menu has no children, check if permission match
|
||||||
else {
|
else if (
|
||||||
if (
|
menu.allowedPermissions?.some((perm) =>
|
||||||
menu.allowedPermissions?.some((perm) =>
|
permissions.includes(perm)
|
||||||
permissions.includes(perm)
|
) ||
|
||||||
) ||
|
menu.allowedPermissions?.includes("*")
|
||||||
menu.allowedPermissions?.includes("*")
|
) {
|
||||||
) {
|
//add menu and hide the allowed permissions field
|
||||||
//add menu and hide the allowed permissions field
|
return [...prev, { ...menu, allowedPermissions: undefined }];
|
||||||
return [
|
|
||||||
...prev,
|
|
||||||
{ ...menu, allowedPermissions: undefined },
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//dont add permission to menu if it doesnt match
|
//dont add permission to menu if it doesnt match
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user