What does this MR do?
This MR does
- Add a new check before
- Add proper tests to check developer will be rejected from erasing job
Are there points in the code the reviewer needs to double check?
New implementation should pass through
can?(current_user, :update_build, build) and
can?(current_user, :erase_build, project)
Why was this MR needed?
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
Changelog entry added, if necessary
API support added
Added for this feature/bug
All builds are passing
Conform by the merge request performance guides
Conform by the style guides
Branch has no merge conflicts with
master(if it does - rebase it please)
Squashed related commits together
What are the relevant issue numbers?
Closes #31771 (moved)