From 2c41343ce58c3e7ff08a304607690f47149abc18 Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Thu, 8 Sep 2022 09:58:53 -0500 Subject: [PATCH] fix: Show audit log in production if allowed (#3960) --- site/src/components/NavbarView/NavbarView.test.tsx | 11 ----------- site/src/components/NavbarView/NavbarView.tsx | 3 +-- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/site/src/components/NavbarView/NavbarView.test.tsx b/site/src/components/NavbarView/NavbarView.test.tsx index 4ff74a1809..276976aad3 100644 --- a/site/src/components/NavbarView/NavbarView.test.tsx +++ b/site/src/components/NavbarView/NavbarView.test.tsx @@ -69,17 +69,6 @@ describe("NavbarView", () => { expect((auditLink as HTMLAnchorElement).href).toContain("/audit") }) - it("audit nav link is only visible in development", async () => { - process.env = { - ...env, - NODE_ENV: "production", - } - - render() - const auditLink = screen.queryByText(navLanguage.audit) - expect(auditLink).not.toBeInTheDocument() - }) - it("audit nav link is hidden for members", async () => { render() const auditLink = screen.queryByText(navLanguage.audit) diff --git a/site/src/components/NavbarView/NavbarView.tsx b/site/src/components/NavbarView/NavbarView.tsx index 646042cacf..93a3247d5e 100644 --- a/site/src/components/NavbarView/NavbarView.tsx +++ b/site/src/components/NavbarView/NavbarView.tsx @@ -52,8 +52,7 @@ const NavItems: React.FC< {Language.users} - {/* REMARK: the below link is under-construction */} - {process.env.NODE_ENV !== "production" && canViewAuditLog && ( + {canViewAuditLog && ( {Language.audit}