summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-07-14 18:51:51 +0000
committerGerrit Code Review <review@openstack.org>2022-07-14 18:51:51 +0000
commitdd9579fc1ac89afe496352dadd568645d3c54c23 (patch)
tree51a053cc5808ab928e94760cd23ebfcf1fb49514
parent8434446c98ff4ee5b7aa5ae4f3c7b14ebab9adea (diff)
parentf72de10b7993b5698b37cfe4dbe93474c3905dc0 (diff)
downloadzuul-dd9579fc1ac89afe496352dadd568645d3c54c23.tar.gz
Merge "GUI: Do not show sign-in button if no IdP is available"
-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>)
}
}
}