Merge pull request #5132 from mabashian/4980-job-details-delete

Hide delete button on job details from users without proper permissions

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot]
2019-10-29 01:18:50 +00:00
committed by GitHub

View File

@@ -272,6 +272,7 @@ function JobDetail({ job, i18n, history }) {
)} )}
</LaunchButton> </LaunchButton>
)} )}
{job.summary_fields.user_capabilities.delete && (
<Button <Button
variant="danger" variant="danger"
aria-label={i18n._(t`Delete`)} aria-label={i18n._(t`Delete`)}
@@ -279,6 +280,7 @@ function JobDetail({ job, i18n, history }) {
> >
{i18n._(t`Delete`)} {i18n._(t`Delete`)}
</Button> </Button>
)}
</ActionButtonWrapper> </ActionButtonWrapper>
{isDeleteModalOpen && ( {isDeleteModalOpen && (
<AlertModal <AlertModal
@@ -299,6 +301,7 @@ function JobDetail({ job, i18n, history }) {
> >
{i18n._(t`Cancel`)} {i18n._(t`Cancel`)}
</Button> </Button>
<Button <Button
variant="danger" variant="danger"
aria-label={i18n._(t`Delete`)} aria-label={i18n._(t`Delete`)}