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 | ![]() |
![]() |
Does Not Have Security Policy Project | ![]() |
![]() |
How to set up and validate locally
- Upload a GitLab Ultimate license
- Navigate to a project one owns =>
Security & Compliance
=>Policies
- Verify the
Edit Policy Project
button is shown - Navigate to a project on does not own and that does have a
Policy Project
linked =>Security & Compliance
=>Policies
- Verify the
View Policy Project
button is shown - Navigate to a project on does not own and that does not have a
Policy Project
linked =>Security & Compliance
=>Policies
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #354140 (closed)
Edited by Alexander Turinske