Hello,
I’m trying to restrict a page to users that belong to a specific group (“premium users”).
The issue is that I can still access that page even if I’m not logged or if I’m logged in but not with the appropriate role.
Here’s a screenshot of the user var when I’m logged in (current logged in user has the role “free”):
Here’s a screenshot of the private access settings for the Premium page:
And here’s a screenshot of the different roles I created (free, premium and admin) and the user group (premium users):
In Supabase, I have those 3 tables:
I would like users not logged in or without the correct role to be redirected to the Home page.
Can someone please help me with this issue?
Thanks