From 84f66f0bbb8d3c5e9cd0a42d814be299e329876a Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Sun, 15 Dec 2024 19:01:08 +0000 Subject: [PATCH] Added possibility for corporates and other to view the entity statistics --- src/pages/statistical.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/pages/statistical.tsx b/src/pages/statistical.tsx index b674e11c..1b77542f 100644 --- a/src/pages/statistical.tsx +++ b/src/pages/statistical.tsx @@ -49,9 +49,6 @@ export const getServerSideProps = withIronSessionSsr(async ({ req, res }) => { const user = await requestUser(req, res) if (!user) return redirect("/login") - if (!checkAccess(user, ["admin", "developer", "mastercorporate"])) - return redirect("/") - const entityIDS = mapBy(user.entities, "id") || []; const entities = await getEntitiesWithRoles(isAdmin(user) ? undefined : entityIDS); const allowedEntities = findAllowedEntities(user, entities, 'view_entity_statistics')