Skip to content

Commit

Permalink
[front] Check permission before redirecting to stored space (#9593)
Browse files Browse the repository at this point in the history
  • Loading branch information
tdraier authored Dec 21, 2024
1 parent ef479bb commit 08bac81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion front/pages/w/[wId]/spaces/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}`,
Expand Down

0 comments on commit 08bac81

Please sign in to comment.