Next.js Discord

Discord Forum

SUPABASE

Unanswered
Sun bear posted this in #help-forum
Open in Discord
Sun bearOP
yo bois
need some help with supabase admin roles
so to handle Role based Auth i have two main tables one for the users data after authenticated and the other table permisions table which references the userId in the users table reason why i have two instead of one is beacuase i want the user to be able to update his data like name and emial etc therefore the they have read and update acess therefreo to prevent any changing of roles i keep a seperate table to restrict to read acess to the role only
Image
Image
anyway my question is in the admin panel i want an admin to be able to create other admin users however whenever i run the action it returns a 403 errr from suapabse saying user is not admin so my question is how and where supabase bases that this users is not admin from the user_meta_data ? or somewhere else that way i can know and change it for admin users accrodingly thanks in advance would appreciaty a reply thnak you 🙂

0 Replies