Skip to content

Conversation

dylkaw
Copy link

@dylkaw dylkaw commented Sep 28, 2024

Resolves #143.

Shifted AuthWrapper into the necessary page.tsx files. When creating new pages, we should now wrap them with the AuthPageWrapper.

Discovered bug where a user who is not logged in would still see the navbar if navigating to a page where they are not authorised.
Screenshot 2024-09-28 at 12 24 45 PM

Fixed it by adding AuthPageWrapper to layout.tsx. In such cases, these users will now only see the unauthorised screen.

Screenshot 2024-09-28 at 12 25 22 PM

Copy link

@jq1836 jq1836 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from admin users being able to view regular user's user-setting page if they have their ids, LGTM.

The above may be an issue because admins will be able to update fields that they cannot normally update in the admin-user-management page.

Copy link

@SelwynAng SelwynAng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me too

@SelwynAng SelwynAng merged commit fb09b02 into main Oct 6, 2024
2 checks passed
@SelwynAng SelwynAng deleted the enhancement/frontend/refactor-auth-wrapper branch October 6, 2024 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor frontend for auth wrapper

3 participants