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,16 @@
|
||||
DROP POLICY IF EXISTS "Association users can view amenity bookings" ON public.amenity_bookings;
|
||||
|
||||
CREATE POLICY "Users can view their own amenity bookings"
|
||||
ON public.amenity_bookings
|
||||
FOR SELECT
|
||||
USING (
|
||||
has_role(auth.uid(), 'admin'::app_role)
|
||||
OR has_role(auth.uid(), 'manager'::app_role)
|
||||
OR has_role(auth.uid(), 'employee'::app_role)
|
||||
OR (auth.uid() IS NOT NULL AND created_by = auth.uid())
|
||||
OR (
|
||||
auth.uid() IS NOT NULL
|
||||
AND guest_email IS NOT NULL
|
||||
AND lower(guest_email) = lower((SELECT email FROM auth.users WHERE id = auth.uid()))
|
||||
)
|
||||
);
|
||||
Reference in New Issue
Block a user