diff options
author | James E. Blair <jim@acmegating.com> | 2022-09-30 11:05:46 -0700 |
---|---|---|
committer | James E. Blair <jim@acmegating.com> | 2022-10-25 20:22:42 -0700 |
commit | 9d2e1339ff9f5080cd23e9d29fcb08315a32e5e9 (patch) | |
tree | c3f4065df16f8d0ab608c7db80a800900e993348 /web/src/containers/autohold | |
parent | 95ec2c45e5cf0369f97aebe33e093698048a3fdb (diff) | |
download | zuul-9d2e1339ff9f5080cd23e9d29fcb08315a32e5e9.tar.gz |
Support authz for read-only web access
This updates the web UI to support the requirement for authn/z
for read-only access.
If authz is required for read access, we will automatically redirect.
If we return and still aren't authorized, we will display an
"Authorization required" page (rather than continuing and popping up
API error notifications).
The API methods are updated to send an authorization token whenever
one is present.
Change-Id: I31c13c943d05819b4122fcbcf2eaf41515c5b1d9
Diffstat (limited to 'web/src/containers/autohold')
-rw-r--r-- | web/src/containers/autohold/AutoholdTable.jsx | 2 | ||||
-rw-r--r-- | web/src/containers/autohold/autoholdModal.jsx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/web/src/containers/autohold/AutoholdTable.jsx b/web/src/containers/autohold/AutoholdTable.jsx index eda75a4df..749258272 100644 --- a/web/src/containers/autohold/AutoholdTable.jsx +++ b/web/src/containers/autohold/AutoholdTable.jsx @@ -87,7 +87,7 @@ function AutoholdTable(props) { ] function handleAutoholdDelete(requestId) { - autohold_delete(tenant.apiPrefix, requestId, user.token) + autohold_delete(tenant.apiPrefix, requestId) .then(() => { dispatch(addNotification( { diff --git a/web/src/containers/autohold/autoholdModal.jsx b/web/src/containers/autohold/autoholdModal.jsx index 522d8639b..5d4ff5208 100644 --- a/web/src/containers/autohold/autoholdModal.jsx +++ b/web/src/containers/autohold/autoholdModal.jsx @@ -64,7 +64,7 @@ const AutoholdModal = props => { let ah_change = change === '' ? null : change let ah_ref = changeRef === '' ? null : changeRef - autohold(tenant.apiPrefix, project, job_name, ah_change, ah_ref, reason, parseInt(count), parseInt(nodeHoldExpiration), user.token) + autohold(tenant.apiPrefix, project, job_name, ah_change, ah_ref, reason, parseInt(count), parseInt(nodeHoldExpiration)) .then(() => { /* TODO it looks like there is a delay in the registering of the autohold request by the backend, meaning we sometimes do not get the newly created request after @@ -209,4 +209,4 @@ AutoholdModal.propTypes = { export default connect((state) => ({ tenant: state.tenant, user: state.user, -}))(AutoholdModal)
\ No newline at end of file +}))(AutoholdModal) |