You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ALTERTABLE"customer" ADD CONSTRAINT"customer_org_id_organization_id_fk"FOREIGN KEY ("org_id") REFERENCES"public"."organization"("id") ON DELETE no action ONUPDATE no action;--> statement-breakpoint
24
+
CREATE POLICY "org_access"ON"customer"AS PERMISSIVE FOR ALL TO "org" USING (org_id = jwt_org_id()) WITH CHECK (org_id = jwt_org_id());--> statement-breakpoint
25
+
CREATE POLICY "org_member_access"ON"customer"AS PERMISSIVE FOR ALL TO "authenticated" USING (org_id = jwt_org_id()) WITH CHECK (org_id = jwt_org_id());--> statement-breakpoint
26
+
CREATE POLICY "customer_read"ON"customer"AS PERMISSIVE FOR ALL TO "customer" USING (org_id = jwt_org_id() AND id = jwt_customer_id());--> statement-breakpoint
27
+
CREATE POLICY "org_read"ON"organization"AS PERMISSIVE FOR SELECT TO "org" USING (id = jwt_org_id());--> statement-breakpoint
28
+
CREATE POLICY "org_member_read"ON"organization"AS PERMISSIVE FOR SELECT TO "authenticated" USING (id = jwt_org_id());
0 commit comments