mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 20:00:43 -03:30
Hide delete button on job details from users without proper permissions
This commit is contained in:
parent
c4a3c0aac1
commit
01788263e2
@ -272,13 +272,15 @@ function JobDetail({ job, i18n, history }) {
|
||||
)}
|
||||
</LaunchButton>
|
||||
)}
|
||||
<Button
|
||||
variant="danger"
|
||||
aria-label={i18n._(t`Delete`)}
|
||||
onClick={() => setIsDeleteModalOpen(true)}
|
||||
>
|
||||
{i18n._(t`Delete`)}
|
||||
</Button>
|
||||
{job.summary_fields.user_capabilities.delete && (
|
||||
<Button
|
||||
variant="danger"
|
||||
aria-label={i18n._(t`Delete`)}
|
||||
onClick={() => setIsDeleteModalOpen(true)}
|
||||
>
|
||||
{i18n._(t`Delete`)}
|
||||
</Button>
|
||||
)}
|
||||
</ActionButtonWrapper>
|
||||
{isDeleteModalOpen && (
|
||||
<AlertModal
|
||||
@ -299,6 +301,7 @@ function JobDetail({ job, i18n, history }) {
|
||||
>
|
||||
{i18n._(t`Cancel`)}
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
variant="danger"
|
||||
aria-label={i18n._(t`Delete`)}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user