© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•7mo ago•
38 replies
alaninnovates, the sequel

Security RLS policy on users table

I have a users table, with a schema that looks like this:
create table public.users (
  id uuid not null,
  organization_id bigint null,
  approved boolean not null default false,
  admin boolean null default false,
);
create table public.users (
  id uuid not null,
  organization_id bigint null,
  approved boolean not null default false,
  admin boolean null default false,
);

Basically, I want to have an auth policy that:
allow users to read users of those within the same organization

Is this achievable with supabase? If so, how? Currently, I have a RLS policy that causes infinate recursion, and I'm not sure how to make one that doesn't
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 on a link table
SupabaseSSupabase / help-and-questions
4y ago
RLS Policy
SupabaseSSupabase / help-and-questions
4mo ago
RLS policy set but message: "new row violates row-level security policy for table xxxxxx"
SupabaseSSupabase / help-and-questions
14mo ago
No RLS on auth.users table on new project
SupabaseSSupabase / help-and-questions
13mo ago