Updated entities
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user