Hide protected pipeline job retry/cancel btns

What does this MR do and why?

Hide protected pipeline job retry/cancel btns

Recently we introduced a new feature to make admin overrides for protected branches explicit. Previously admins could always push and merge protected branches, after the chagne they can only do so if the protected branch allows push or merge from Instance admins.

When admins cannot push to a protected branch they also shouldn't be able to cancel or retry a job on the protected branch.

This change modifies the CI::BuildPolicy to remove the admin override

Fixes Admin user without permission on protected bran... (#416897 - closed)

Changelog: fixed

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
image image
image image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. In you GDK create a new project.
  2. Navigate to Settings > Repository > Protected Branch.
  3. Modify the rule for main and set allow to push to No one.
  4. Create a simple ci config
  5. Create a new branch and merge it into main
  6. Go to the pipelines page and see the pipeline that is running for the newest merge commit.

No retry or cancel button should be shown. On the job page no bin icon should be shown or the retry button.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading