Hide delete button if no permissions to delete an artifact
Details
The artifact page disables the delete button for anyone who is not maintainer+
roles. If I'm a developer, I will never be able to delete artifacts unless I somehow am given maintainer+ permissions, which would likely never happen.
Proposal
Hide the delete button for anyone who is not maintainer+
, including the delete all artifacts in the job and individual job artifact deletion. (note: this proposal design includes disabled buttons for expired artifacts, which can be a separate iteration)
Current | Proposed |
---|---|
![]() |
![]() |
Technical proposal
Add another bit of data to #js-artifact-management
: "can-delete-artifacts" => can?(current_user, :destroy_artifacts, @project).to_s
, provide it to vue here, add v-if
s to the delete buttons that depend on it.
Edited by Miranda Fluharty