Replies: 1 comment
-
You are asking about two different things here, one is a database role (custom role) and the other is an application role (custom claims). You should decide which you are trying to accomplish before moving on to the next step. Database roles should only be used when you fully understand how they work and the implications of using them, you can assign multiple database roles to a database user, do note database user and application users are two different things. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
I'm working on setting up an admin panel for my Supabase PostgreSQL database, and I've come across various approaches. Some solutions suggest using custom claims, while others recommend creating custom roles. The range of methods is as diverse as the colors in a rainbow, but I haven't found a definitive solution yet.
What I need is to create a custom role, let's call it "admin," that bypasses all the security rules on the public schema and can log in. Afterward, I want to assign this role to one of the users who already has the "authenticated" role.
I tried doing this using the SQL editor. I created the role, granted all the necessary privileges, and assigned it to a user. However, when I logged in with that user, the client-side threw an error saying it couldn't assign the admin role.
What am I missing? Has anyone faced a similar issue, or is there a specific method I should follow to create and assign this custom role correctly
Beta Was this translation helpful? Give feedback.
All reactions