diff --git a/assets/js/components/Top/Navigation.vue b/assets/js/components/Top/Navigation.vue index 3efc6d1d9..3db3845c3 100644 --- a/assets/js/components/Top/Navigation.vue +++ b/assets/js/components/Top/Navigation.vue @@ -167,6 +167,7 @@ export default defineComponent({ evopt: { type: Object as PropType, required: false }, fatal: { type: Array as PropType, default: () => [] }, experimental: Boolean, + authDisabled: Boolean, }, emits: ["auth-required"], data() { @@ -217,7 +218,7 @@ export default defineComponent({ return !!this.evopt && this.experimental; }, showLogout() { - return isLoggedIn(); + return !this.authDisabled && isLoggedIn(); }, }, mounted() { diff --git a/tests/auth.spec.ts b/tests/auth.spec.ts index 28d8121cd..67edf764d 100644 --- a/tests/auth.spec.ts +++ b/tests/auth.spec.ts @@ -172,6 +172,7 @@ test("disable auth", async ({ page }) => { // configuration page without login await openTopNavigation(page); + await expect(page.getByRole("button", { name: "Logout" })).not.toBeVisible(); await page.getByRole("link", { name: "Configuration" }).click(); await expectTopNavigationClosed(page); await expect(page.getByRole("heading", { name: "Configuration" })).toBeVisible();