Config UI: don't show "Logout" when started with --disable-auth (#29074)
This commit is contained in:
parent
4b9474481a
commit
ffab2c8721
2 changed files with 3 additions and 1 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue