Skip to content

Commit 4ca9825

Browse files
committedMar 27, 2024
Conditionally enable Logout button
1 parent 41fc358 commit 4ca9825

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎packages/web-console/src/components/TopBar/toolbar.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ export const Toolbar = () => {
8282
const { logout } = useAuth()
8383
const result = useSelector(selectors.query.getResult)
8484
const [serverDetails, setServerDetails] = useState<ServerDetails | null>(null)
85-
86-
const basicAuthEnabled = settings["acl.basic.auth.realm.enabled"]
85+
86+
const authEnabled = settings["acl.basic.auth.realm.enabled"] || settings["acl.oidc.enabled"]
8787

8888
const fetchServerDetails = async () => {
8989
try {
@@ -137,7 +137,7 @@ export const Toolbar = () => {
137137
<Text color="foreground">{serverDetails.current_user}</Text>
138138
</User>
139139
)}
140-
{!basicAuthEnabled && (
140+
{authEnabled && (
141141
<Button
142142
onClick={() => logout()}
143143
prefixIcon={<LogoutCircle size="18px" />}

0 commit comments

Comments
 (0)
Failed to load comments.