From 08bac813847bca5ef3413856b3dcc221343508cd Mon Sep 17 00:00:00 2001 From: Thomas Draier Date: Sat, 21 Dec 2024 10:30:30 +0100 Subject: [PATCH] [front] Check permission before redirecting to stored space (#9593) --- front/pages/w/[wId]/spaces/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/pages/w/[wId]/spaces/index.tsx b/front/pages/w/[wId]/spaces/index.tsx index 4aa898a129db..6996c1e16988 100644 --- a/front/pages/w/[wId]/spaces/index.tsx +++ b/front/pages/w/[wId]/spaces/index.tsx @@ -20,7 +20,7 @@ export const getServerSideProps = withDefaultUserAuthRequirements( ); if (selection.lastSpaceId) { const space = await SpaceResource.fetchById(auth, selection.lastSpaceId); - if (space) { + if (space && space.canList(auth)) { return { redirect: { destination: `/w/${owner.sId}/spaces/${space.sId}`,