summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorMatthieu Huin <mhuin@redhat.com>2022-02-28 16:28:45 +0100
committerMatthieu Huin <mhuin@redhat.com>2022-05-18 08:05:20 +0000
commitf72de10b7993b5698b37cfe4dbe93474c3905dc0 (patch)
treee46d0d9b2d0da66df7a11cccb82546f19e705fae /web
parent50a8d8ab96154c6dba54a84f56bba8067942de55 (diff)
downloadzuul-f72de10b7993b5698b37cfe4dbe93474c3905dc0.tar.gz
GUI: Do not show sign-in button if no IdP is available
Signing in is only possible with an OpenIDConnect IdP associated to a tenant. If only a local authenticator is configured (ie H256 driver) do not display the sign-in button. Change-Id: Ic2cb9a7ba57ed7364cf2a0ece500d3d4fdcbc775
Diffstat (limited to 'web')
-rw-r--r--web/src/containers/auth/Auth.jsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/web/src/containers/auth/Auth.jsx b/web/src/containers/auth/Auth.jsx
index e57e12963..177e9a02d 100644
--- a/web/src/containers/auth/Auth.jsx
+++ b/web/src/containers/auth/Auth.jsx
@@ -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>)
}
}
}