Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabaseβ€’3y agoβ€’
14 replies
Heugh_Jazz

what should my policy look like?

hey guys, if i'm using the auth schema that supabase uses for users table, change a specific user's role to 'admin'. The users are signing up through a provider of that adds anything.

what should my policy look like so that only an admin is able to interact with my bucket?

here's what i have and i can't get it to work when i try uploading:
CREATE POLICY "Give admin users access to folder 1fla722_0" ON storage.objects FOR SELECT TO public USING (bucket_id = 'sign_images' AND auth.role() = 'admin');
CREATE POLICY "Give admin users access to folder 1fla722_0" ON storage.objects FOR SELECT TO public USING (bucket_id = 'sign_images' AND auth.role() = 'admin');


i keep getting the following error when uploading from my page.svelte file:
```"new row violates row-level security p
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

project look like paused
SupabaseSSupabase / help-and-questions
5mo ago
My UPDATE policy for db row is not working as it should:
SupabaseSSupabase / help-and-questions
6mo ago
What should I learn
SupabaseSSupabase / help-and-questions
4y ago
RLS Policy
SupabaseSSupabase / help-and-questions
4mo ago