From a0a9402945beb41561f9a0b92284c0778f008586 Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Thu, 17 Oct 2024 16:18:50 +0100 Subject: [PATCH] Updated entities --- src/pages/entities/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/entities/index.tsx b/src/pages/entities/index.tsx index 96b26998..2ae539a2 100644 --- a/src/pages/entities/index.tsx +++ b/src/pages/entities/index.tsx @@ -29,7 +29,7 @@ export const getServerSideProps = withIronSessionSsr(async ({req, res}) => { if (shouldRedirectHome(user)) return redirect("/") const entityIDs = mapBy(user.entities, 'id') - const entities = await getEntitiesWithRoles(entityIDs); + const entities = await getEntitiesWithRoles(["admin", "developer"].includes(user.type) ? undefined : entityIDs); const allowedEntities = findAllowedEntities(user, entities, 'view_entities') const entitiesWithCount = await Promise.all(