I think supabase just updated the UI. right now you can do it in the sql editor and create the trigger from there by using this command. create trigger after insert on auth.users for each row execute function ();
@markbroomfield1818 Жыл бұрын
Apologises for being thick but could you tell me where I need to add this code? Thank you again for your help, Mark
@DailyWebCoding Жыл бұрын
@@markbroomfield1818 In supabase dashboard sidebar. You can find SQL Editor. That's where you can run the code above
@markbroomfield1818 Жыл бұрын
@@DailyWebCoding Apologies, I understand it needs to be added to the SQL Editor. However, does it need to be attached to anything else or just a seperate code and run? Thanks Mark
@DailyWebCoding Жыл бұрын
@@markbroomfield1818 kzbin.info/www/bejne/o5TVoqFtbNGIo68si=GiVaHvcrioXb9bZY you can check this video. Hope is can help you
@markbroomfield1818 Жыл бұрын
@@DailyWebCoding Thank you so much for the quick work around on this. Works a treat, great channel and please keep up the amazing work. Thanks Mark
@FalconMasters Жыл бұрын
There is one security problem with that aproach that you all guys have to be aware of. If you make a "user" or "profile" table where you store all the user info like, name, avatar, settings, etc and you store the role on that same table you have a security issue there. Because you will probably make a Row Level Security where you are going to allow users edit their own row in "user" table, therefore the user will have access to change his own role to "admin". To solve this you have to add the "role" column on a different table and that table should have a Row Level Security that only allows to read and not to write/update.
@guillermomarindavila5779 Жыл бұрын
gracias falcon, aprendi mucho de ti en un inicio y vaya sorpresa con el comentario, tienes razon!
@FalconMasters Жыл бұрын
@@guillermomarindavila5779 Muchas gracias a ti por ver mis videos, me alegra que te sirvieran!
@Sirin-i8j6 ай бұрын
thnx
@petrecosminbadescu61614 ай бұрын
I think you can also freeze the column, creating a policy for it
@codewithguillaume Жыл бұрын
Amazing video :) Please continue !
@DailyWebCoding Жыл бұрын
Thank you ❤️
@kryptons-galaxy10 ай бұрын
Perfect tutorial, I was confused with managing the user accesses, this one cleared all the doubts, thanks ❤
@DailyWebCoding10 ай бұрын
Glad it helped!
@dimitarius41374 ай бұрын
Thank you, this was actually all I was looking for, perfect tutorial, thank you so much!!
@engelbertteh5523 ай бұрын
Just what I needed, thanks!
@rizqyhbb3 ай бұрын
THANKS! this is really helpful
@matteoperonidev4 ай бұрын
Thanks man, you saved my life ❤
@Aziz-kw6ct3 ай бұрын
Your video saved me. thank you very much.
@giroda Жыл бұрын
nice video and nice line-height
@cheninh1423 Жыл бұрын
so clearly. thank you
@markbroomfield1818 Жыл бұрын
Hello, great tutorial 👍 ! Everything was going fine until when I needed to select the auth table (timestamp 06:23) in the trigger ui. Only my public tables were available and not anything else! Is there a reason why I can't make triggers from any of the locked shemas? Can you help. Thanks, Mark
@raynosebastian6275 Жыл бұрын
currently facing the same thing right now, did you find the solution?
@DailyWebCoding Жыл бұрын
I think supabase just updated the UI. right now you can do it in the sql editor and create the trigger from there by using this command. create trigger after insert on auth.users for each row execute function ();
@codingcode693 ай бұрын
What font and vs code settings you have it looks super clean is there a link to your settings 😅
@angelluis5252 Жыл бұрын
nice video, i have a qustion, how can i change the role using params? i need create multiples roles
@DailyWebCoding Жыл бұрын
Currently I am working on a new video about this as well. Stay tuned for that
@raynosebastian6275 Жыл бұрын
hi a beginner here, why i cant choose the users from the trigger option right now ?
@DailyWebCoding Жыл бұрын
I think supabase just updated the UI. right now you can do it in the sql editor and create the trigger from there by using this command. create trigger after insert on auth.users for each row execute function ();
@brianwalsh7040 Жыл бұрын
Great videos, thanks! Could you do one where anyone visiting the site can view the all the posts, but only an admin can update the posts that belong to them?
@DailyWebCoding Жыл бұрын
Thank you for your suggestion. I will try to do that.
@appstuff6565 Жыл бұрын
yes pleaSE ! @@DailyWebCoding
@streamocu2929 Жыл бұрын
we want more... ❤ could you do supabase and stripe?
@DailyWebCoding Жыл бұрын
I will look into that. Thank you for your suggestion.
@automioai Жыл бұрын
Yes! stripe-supa -next 13.4-jotai
@user-dm5qi4nb6l Жыл бұрын
Supabase has a roles column in auth.users I tried to use that but maybe that is not how it is supposed to be used maybe that's only there to be managed for supabase? I created a custom role give it to a user but then when I made the rule it was simply not working, of course I gave the user in auth.users that custom role but then I had to change it back to authenticated then update the rule and it worked normally.
@DailyWebCoding Жыл бұрын
You can check my latest video about role management in supabase Build Role Access Dashboard with Next.js 14,Supabase, Shadcn,Tailwind kzbin.info/www/bejne/emilq6OsfbJpgKs
@DeejayAlid Жыл бұрын
Are there any security flaws using this method?
@FalconMasters Жыл бұрын
Yes, that if you make a row level security that allows the user to update his profile or user info and is on the same table as the rol then he has access to update his role and set it to "admin" giving him self permissions. One way to fix this is to have 2 diferent tables for the user, one for his data and other one for his role or permissions.
@Michael-Martell Жыл бұрын
I think a regional manager with several managers with several teams. Managers should only see their teams… etc. I’ve been thinking about how to make this works for several years now as I have learned to code.
@ambicasupraja9651 Жыл бұрын
i am getting this error while sign up AuthApiError: duplicate key value violates unique constraint "user_pkey" as i am created trigger from sql editor
@utomoyogafirmansyah7912 Жыл бұрын
But how to set role while we signup not with supabase?
@rgorai1029 Жыл бұрын
I need this too 😭 did you ever figure it out?
@utomoyogafirmansyah7912 Жыл бұрын
@@rgorai1029 yeah i make another table that containing userprofile and role and after signup an get token user need to set his role
@thisismedg Жыл бұрын
@@rgorai1029 me too
@loribryant4999 Жыл бұрын
sir can you create a react version of this please I dont understang nextJS
@loribryant4999 Жыл бұрын
hey bro can you updated this please I need this and the role please dont just put the role in it manuall make it dynamic, also please take it slow man you kind super fast
@DailyWebCoding Жыл бұрын
Build Role Access Dashboard with Next.js 14,Supabase, Shadcn,Tailwind kzbin.info/www/bejne/emilq6OsfbJpgKs
@DailyWebCoding Жыл бұрын
You can check this one
@loribryant4999 Жыл бұрын
@@DailyWebCoding thank you sir, are you able to create a video like this with reactJS alone please
@ahmedmusawir6 ай бұрын
Your head is covering code ... we really didn't need to see your face ... we just needed to see code which we couldn't for your head which makes this video useless ...