Skip to content

Add "view policy project" button for non-owners

What does this MR do and why?

Add "view policy project" button for non-owners

  • on the security policy page, non-owners cannot link a policy project, so the button to do so is hidden
  • give non-owners a button that links them to the policy project, if one exists
  • update tests

Changelog: added

EE: true

Screenshots or screen recordings

Project Scenario Owner Non-Owner
Does Have Security Policy Project Screen_Shot_2022-03-07_at_13.14.46 Screen_Shot_2022-03-08_at_13.34.16
Does Not Have Security Policy Project Screen_Shot_2022-03-07_at_13.14.46 Screen_Shot_2022-03-08_at_13.36.37

How to set up and validate locally

  1. Upload a GitLab Ultimate license
  2. Navigate to a project one owns => Security & Compliance => Policies
  3. Verify the Edit Policy Project button is shown
  4. Navigate to a project on does not own and that does have a Policy Project linked => Security & Compliance => Policies
  5. Verify the View Policy Project button is shown
  6. Navigate to a project on does not own and that does not have a Policy Project linked => Security & Compliance => Policies
  7. Verify the Edit/View Policy Project buttons are not shown

MR acceptance checklist

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

Related to #354140 (closed)

Edited by Alexander Turinske

Merge request reports