From 057b2f17055be6a89c36049543bfcf7d23ccfd78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Og=C3=B3rek?= Date: Fri, 19 Jul 2024 21:15:52 +0200 Subject: [PATCH] fix: Bail on audit logs permissions (#28096) --- .../interfaces/Organization/AuditLogs/AuditLogs.tsx | 4 ++-- .../interfaces/Reports/renderers/ApiRenderers.tsx | 8 ++++---- .../project/[ref]/functions/[functionSlug]/index.tsx | 9 +++++++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/apps/studio/components/interfaces/Organization/AuditLogs/AuditLogs.tsx b/apps/studio/components/interfaces/Organization/AuditLogs/AuditLogs.tsx index c4b98bb7504..8a0865d6e8e 100644 --- a/apps/studio/components/interfaces/Organization/AuditLogs/AuditLogs.tsx +++ b/apps/studio/components/interfaces/Organization/AuditLogs/AuditLogs.tsx @@ -69,7 +69,7 @@ const AuditLogs = () => { { enabled: canReadAuditLogs, retry(_failureCount, error) { - if (error.message.endsWith('upgrade to team or Enterprise Plan to access audit logs.')) { + if (error.message.endsWith('upgrade to Team or Enterprise Plan to access audit logs.')) { return false } return true @@ -144,7 +144,7 @@ const AuditLogs = () => { )} {isError ? ( - error.message.endsWith('upgrade to team or Enterprise Plan to access audit logs.') ? ( + error.message.endsWith('upgrade to Team or Enterprise Plan to access audit logs.') ? (