© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
11 replies
merlo

RLS - Help with Insert Policy

My objective: only an admin can insert an amenity, and it must match the id of the condo the admin already belongs too.

I'm trying:

exists (
  select 1
  from condos
  where auth.uid() = condos.admin_id
)
exists (
  select 1
  from condos
  where auth.uid() = condos.admin_id
)


But I'm getting new row violates row-level security policy for table "amenities\

What am I doing wrong?
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

RLS policy help
SupabaseSSupabase / help-and-questions
3y ago
need help with RLS policy
SupabaseSSupabase / help-and-questions
5mo ago
RLS policy blocking Insert from Debug
SupabaseSSupabase / help-and-questions
5mo ago
RLS Policy
SupabaseSSupabase / help-and-questions
4mo ago