mirror of
https://github.com/renee-png/acmcc.git
synced 2026-06-21 09:50:01 +00:00
Add ACMCC app source, Supabase backend, and project config
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
DROP POLICY IF EXISTS "Homeowners can view own unit ledger entries" ON public.owner_ledger_entries;
|
||||
DROP POLICY IF EXISTS "Owners can view own ledger" ON public.owner_ledger_entries;
|
||||
|
||||
CREATE POLICY "Owners can view own ledger entries"
|
||||
ON public.owner_ledger_entries
|
||||
FOR SELECT
|
||||
TO authenticated
|
||||
USING (
|
||||
EXISTS (
|
||||
SELECT 1
|
||||
FROM public.owners o
|
||||
WHERE o.user_id = auth.uid()
|
||||
AND o.association_id = owner_ledger_entries.association_id
|
||||
AND (
|
||||
o.id = owner_ledger_entries.owner_id
|
||||
OR (o.unit_id IS NOT NULL AND o.unit_id = owner_ledger_entries.unit_id)
|
||||
)
|
||||
)
|
||||
);
|
||||
Reference in New Issue
Block a user