Config UI: don't show "Logout" when started with --disable-auth (#29074)

This commit is contained in:
Copilot 2026-04-13 16:31:52 +02:00 • committed by GitHub
parent 4b9474481a
commit ffab2c8721
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -167,6 +167,7 @@ export default defineComponent({
evopt: { type: Object as PropType<EvOpt>, required: false },
fatal: { type: Array as PropType<FatalError[]>, 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() {

View file

@ -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();