Studio's current editor, reproduced from
PolicyEditorPanel/PolicyDetailsV2.tsx.
Field labels are verbatim.
on clauseas clauseto clauseEmits to public.
for clause
Untick to see the failure that is 13.7% of the coded corpus: a correct policy,
and 42501 permission denied.
A second permissive policy, to public.
Tick it to watch two policies combine with OR,
and to see rows reach callers your own policy never targeted.
Sample data. Six rows in public.projects,
owned by three users across two organisations, two of them published, plus a
memberships table.
The preview follows the audience. Choosing who the policy covers, on the left, decides
which callers appear here. Scope it to signed-in users and you are previewing Ana, Ben and
Priya. Scope it to everyone and a logged-out visitor joins them, which is the case worth
looking at, because a rule built on auth.uid()
returns nothing to a caller with no session.