From 64323bb975776c872f108d1891709191f7d778a0 Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Thu, 8 Sep 2022 14:36:59 +0000 Subject: [PATCH] fix: Show audit log in production if allowed --- 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 4ff74a1809b64..276976aad3e17 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 646042cacf9ff..93a3247d5e35b 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}