From de8d13a4c1581876a2ac73438680a1115c43d8ab Mon Sep 17 00:00:00 2001 From: Ted Liang Date: Wed, 24 Dec 2025 15:10:13 +1100 Subject: [PATCH] fix: hide branding logo in audit log (#2342) --- .../_internal+/[__htmltopdf]+/audit-log.tsx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/apps/remix/app/routes/_internal+/[__htmltopdf]+/audit-log.tsx b/apps/remix/app/routes/_internal+/[__htmltopdf]+/audit-log.tsx index aa1fc66e5..b4e6716f9 100644 --- a/apps/remix/app/routes/_internal+/[__htmltopdf]+/audit-log.tsx +++ b/apps/remix/app/routes/_internal+/[__htmltopdf]+/audit-log.tsx @@ -10,6 +10,7 @@ import { RECIPIENT_ROLES_DESCRIPTION } from '@documenso/lib/constants/recipient- import { unsafeGetEntireEnvelope } from '@documenso/lib/server-only/admin/get-entire-document'; import { decryptSecondaryData } from '@documenso/lib/server-only/crypto/decrypt'; import { findDocumentAuditLogs } from '@documenso/lib/server-only/document/find-document-audit-logs'; +import { getOrganisationClaimByTeamId } from '@documenso/lib/server-only/organisation/get-organisation-claims'; import { mapSecondaryIdToDocumentId } from '@documenso/lib/utils/envelope'; import { getTranslations } from '@documenso/lib/utils/i18n'; import { Card, CardContent } from '@documenso/ui/primitives/card'; @@ -53,6 +54,8 @@ export async function loader({ request }: Route.LoaderArgs) { throw redirect('/'); } + const organisationClaim = await getOrganisationClaimByTeamId({ teamId: envelope.teamId }); + const documentLanguage = ZSupportedLanguageCodeSchema.parse(envelope.documentMeta?.language); const { data: auditLogs } = await findDocumentAuditLogs({ @@ -81,6 +84,7 @@ export async function loader({ request }: Route.LoaderArgs) { deletedAt: envelope.deletedAt, documentMeta: envelope.documentMeta, }, + hidePoweredBy: organisationClaim.flags.hidePoweredBy, documentLanguage, messages, }; @@ -95,7 +99,7 @@ export async function loader({ request }: Route.LoaderArgs) { * Update: Maybe tags work now after RR7 migration. */ export default function AuditLog({ loaderData }: Route.ComponentProps) { - const { auditLogs, document, documentLanguage, messages } = loaderData; + const { auditLogs, document, documentLanguage, hidePoweredBy, messages } = loaderData; const { i18n, _ } = useLingui(); @@ -188,11 +192,13 @@ export default function AuditLog({ loaderData }: Route.ComponentProps) { -
-
- + {!hidePoweredBy && ( +
+
+ +
-
+ )}
); }