From a0aed35e01a13ab7addb5ca37d111fd8712d22f2 Mon Sep 17 00:00:00 2001 From: Joshen Lim Date: Wed, 6 Nov 2024 17:11:26 +0800 Subject: [PATCH] Fix secrets perms (#30321) --- .../Functions/EdgeFunctionSecrets/EdgeFunctionSecret.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/studio/components/interfaces/Functions/EdgeFunctionSecrets/EdgeFunctionSecret.tsx b/apps/studio/components/interfaces/Functions/EdgeFunctionSecrets/EdgeFunctionSecret.tsx index ba5212aafdf..21766dcdd14 100644 --- a/apps/studio/components/interfaces/Functions/EdgeFunctionSecrets/EdgeFunctionSecret.tsx +++ b/apps/studio/components/interfaces/Functions/EdgeFunctionSecrets/EdgeFunctionSecret.tsx @@ -12,7 +12,7 @@ interface EdgeFunctionSecretProps { } const EdgeFunctionSecret = ({ secret, onSelectDelete }: EdgeFunctionSecretProps) => { - const canUpdateSecrets = useCheckPermissions(PermissionAction.FUNCTIONS_WRITE, '*') + const canUpdateSecrets = useCheckPermissions(PermissionAction.SECRETS_WRITE, '*') // [Joshen] Following API's validation: // https://github.com/supabase/infrastructure/blob/develop/api/src/routes/v1/projects/ref/secrets/secrets.controller.ts#L106 const isReservedSecret = !!secret.name.match(/^(SUPABASE_).*/)