The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Prefill bucket id when creating a full custom policy for storage for that bucket
Joshen Lim96801fd67262
diff --git a/studio/components/to-be-cleaned/Storage/StoragePolicies/StoragePoliciesEditPolicyModal.js b/studio/components/to-be-cleaned/Storage/StoragePolicies/StoragePoliciesEditPolicyModal.jsindex a0d94825192..5d017de6952 100644--- a/studio/components/to-be-cleaned/Storage/StoragePolicies/StoragePoliciesEditPolicyModal.js+++ b/studio/components/to-be-cleaned/Storage/StoragePolicies/StoragePoliciesEditPolicyModal.js@@ -50,7 +50,15 @@ const StoragePoliciesEditPolicyModal = ({/* Methods to determine which step to show */const onViewIntro = () => setView(POLICY_MODAL_VIEWS.SELECTION)- const onViewEditor = () => setView(POLICY_MODAL_VIEWS.EDITOR)+ const onViewEditor = (state) => {+ if (state === 'new') {+ setPolicyFormFields({+ ...policyFormFields,+ definition: `bucket_id = '${bucketName}'`,+ })+ }+ setView(POLICY_MODAL_VIEWS.EDITOR)+ }const onViewTemplates = () => {setPreviousView(view)setView(POLICY_MODAL_VIEWS.TEMPLATES)@@ -211,7 +219,7 @@ const StoragePoliciesEditPolicyModal = ({<PolicySelectiondescription="PostgreSQL policies control access to your files and folders"onViewTemplates={onViewTemplates}- onViewEditor={onViewEditor}+ onViewEditor={() => onViewEditor('new')}/>) : view === POLICY_MODAL_VIEWS.EDITOR ? (<StoragePoliciesEditor