Remove logs
This commit is contained in:
parent
add12c0fb6
commit
029947f1cc
|
|
@ -25,7 +25,6 @@ export default async function getSidebarMenus(): Promise<
|
||||||
const permissions = await getUserPermissions();
|
const permissions = await getUserPermissions();
|
||||||
|
|
||||||
for (let menu of sidebarMenus) {
|
for (let menu of sidebarMenus) {
|
||||||
console.log("aaa");
|
|
||||||
//if has children
|
//if has children
|
||||||
if (menu.children) {
|
if (menu.children) {
|
||||||
const currentMenuChildren: SidebarMenu["children"] = [];
|
const currentMenuChildren: SidebarMenu["children"] = [];
|
||||||
|
|
@ -52,10 +51,6 @@ export default async function getSidebarMenus(): Promise<
|
||||||
}
|
}
|
||||||
//if does not have any children
|
//if does not have any children
|
||||||
else {
|
else {
|
||||||
// console.table({
|
|
||||||
// allowedPermissions: menu.allowedPermissions,
|
|
||||||
// userPermissions: permissions
|
|
||||||
// })
|
|
||||||
if (
|
if (
|
||||||
menu.allowedPermissions?.some((perm) =>
|
menu.allowedPermissions?.some((perm) =>
|
||||||
permissions?.includes(perm)
|
permissions?.includes(perm)
|
||||||
|
|
@ -69,9 +64,6 @@ export default async function getSidebarMenus(): Promise<
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("permissions", permissions);
|
|
||||||
console.log("menus", filteredMenus);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
success: true,
|
success: true,
|
||||||
data: filteredMenus,
|
data: filteredMenus,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user