flows: always show flow inspector in debug mode, don't require admin in debug (#3786)

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens L
2022-10-14 16:44:59 +03:00
committed by GitHub
parent 884f5249d1
commit 79e8b72569
5 changed files with 21 additions and 8 deletions

View File

@ -36,6 +36,7 @@ import PFTitle from "@patternfly/patternfly/components/Title/title.css";
import PFBase from "@patternfly/patternfly/patternfly-base.css";
import {
CapabilitiesEnum,
ChallengeChoices,
ChallengeTypes,
CurrentTenant,
@ -154,7 +155,11 @@ export class FlowExecutor extends AKElement implements StageHost {
super();
this.ws = new WebsocketClient();
this.flowSlug = window.location.pathname.split("/")[3];
this.inspectorOpen = window.location.search.includes("inspector");
this.inspectorOpen =
globalAK()?.config.capabilities.includes(CapabilitiesEnum.Debug) || false;
if (window.location.search.includes("inspector")) {
this.inspectorOpen = !this.inspectorOpen;
}
tenant().then((tenant) => (this.tenant = tenant));
}