From 3cee64821ba91de9ef749709643677bfa2d7796c Mon Sep 17 00:00:00 2001 From: joel Date: Fri, 11 Oct 2024 21:21:03 +0200 Subject: [PATCH] fix: allow updating --- .../components/interfaces/Auth/RateLimits/RateLimits.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/studio/components/interfaces/Auth/RateLimits/RateLimits.tsx b/apps/studio/components/interfaces/Auth/RateLimits/RateLimits.tsx index fdaae95e433..4fc1b20e8e4 100644 --- a/apps/studio/components/interfaces/Auth/RateLimits/RateLimits.tsx +++ b/apps/studio/components/interfaces/Auth/RateLimits/RateLimits.tsx @@ -52,7 +52,8 @@ const RateLimits = () => { }, }) - const canUpdateEmailLimit = authConfig?.EXTERNAL_EMAIL_ENABLED && isSmtpEnabled(authConfig) + const hasAuthEmailHookEnabled = authConfig?.HOOK_SEND_EMAIL_ENABLED + const canUpdateEmailLimit = authConfig?.EXTERNAL_EMAIL_ENABLED && (isSmtpEnabled(authConfig) || hasAuthEmailHookEnabled) const canUpdateSMSRateLimit = authConfig?.EXTERNAL_PHONE_ENABLED && !authConfig?.SMS_AUTOCONFIRM const canUpdateAnonymousUsersRateLimit = authConfig?.EXTERNAL_ANONYMOUS_USERS_ENABLED @@ -127,7 +128,6 @@ const RateLimits = () => { // eslint-disable-next-line react-hooks/exhaustive-deps }, [isSuccess]) - const hasAuthEmailHookEnabled = authConfig?.HOOK_SEND_EMAIL_ENABLED return (