Merge "GUI: Do not show sign-in button if no IdP is available"

This commit is contained in:
Zuul 2022-07-14 18:51:51 +00:00 committed by Gerrit Code Review
commit dd9579fc1a
1 changed files with 3 additions and 2 deletions

View File

@ -264,10 +264,11 @@ class AuthContainer extends React.Component {
if (info.isFetching) {
return (<><div style={containerStyles}>Fetching auth info ...</div></>)
}
if (auth.info && auth.info.default_realm) {
// auth_params.authority is only set if an OpenID Connect auth is available
if (auth.info && auth.info.default_realm && auth.auth_params.authority) {
return this.renderButton(containerStyles)
} else {
return (<div style={containerStyles} title="Authentication disabled">-</div>)
return (<div style={containerStyles} title='Authentication disabled'>-</div>)
}
}
}