Merge branch 'fix/FE/route-permission' into 'development'

[FIX/FE] Format pathname for route permission

See merge request mbugroup/lti-web-client!141
This commit is contained in:
Rivaldi A N S
2026-01-07 06:57:59 +00:00
+3 -1
View File
@@ -67,7 +67,9 @@ const MainDrawer = ({
const pathname = usePathname();
const { permissionCheck } = useAuth();
const isPermitted = ROUTE_PERMISSIONS[pathname]?.some((permission) =>
const formattedPathname = pathname.endsWith('/') ? pathname : `${pathname}/`;
const isPermitted = ROUTE_PERMISSIONS[formattedPathname]?.some((permission) =>
permissionCheck(permission)
);