mirror of
https://github.com/ansible/awx.git
synced 2026-02-25 23:16:01 -03:30
Hide delete button on job details from users without proper permissions
This commit is contained in:
@@ -272,13 +272,15 @@ function JobDetail({ job, i18n, history }) {
|
|||||||
)}
|
)}
|
||||||
</LaunchButton>
|
</LaunchButton>
|
||||||
)}
|
)}
|
||||||
<Button
|
{job.summary_fields.user_capabilities.delete && (
|
||||||
variant="danger"
|
<Button
|
||||||
aria-label={i18n._(t`Delete`)}
|
variant="danger"
|
||||||
onClick={() => setIsDeleteModalOpen(true)}
|
aria-label={i18n._(t`Delete`)}
|
||||||
>
|
onClick={() => setIsDeleteModalOpen(true)}
|
||||||
{i18n._(t`Delete`)}
|
>
|
||||||
</Button>
|
{i18n._(t`Delete`)}
|
||||||
|
</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`)}
|
||||||
|
|||||||
Reference in New Issue
Block a user