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,13 @@
|
||||
-- Add 'management' role to app_role enum
|
||||
ALTER TYPE public.app_role ADD VALUE IF NOT EXISTS 'management';
|
||||
|
||||
-- Add visible_to_roles to amenities (which roles can view this amenity's calendar)
|
||||
ALTER TABLE public.amenities
|
||||
ADD COLUMN IF NOT EXISTS visible_to_roles jsonb NOT NULL DEFAULT '[]'::jsonb;
|
||||
|
||||
-- Seed default (no permissions) role_permissions rows for the new 'management' role
|
||||
-- across all existing feature areas; safe to re-run.
|
||||
INSERT INTO public.role_permissions (role, feature_area, can_read, can_create, can_edit, can_delete)
|
||||
SELECT 'management', feature_area, false, false, false, false
|
||||
FROM (SELECT DISTINCT feature_area FROM public.role_permissions) f
|
||||
ON CONFLICT (role, feature_area) DO NOTHING;
|
||||
Reference in New Issue
Block a user