Display error when user lacks permission to create policy project
requested to merge 386497-namespace-is-not-valid-error-when-configuring-scan-result-policies into master
What does this MR do and why?
Currently, when a user with insufficient permissions attempts to create a new security policy project, a generic error message is displayed ("Namespace is not valid"). This MR updates the error message so that it notes insufficient permissions.
Screenshots or screen recordings
Before
![](/-/project/278964/uploads/f677374784852712146ee82620bbd914/Screenshot_2023-01-26_at_17.35.09.png)
After
![](/-/project/278964/uploads/f9fe84051ddb26b592f8e7642269ebf4/Screenshot_2023-01-26_at_16.47.36.png)
How to set up and validate locally
- Create a new project
- Navigate to Settings > General
- Expand the "Permissions" section. In the "Roles allowed to create projects" dropdown, select the "No one" option.
- Navigate to Security & Compliance > Policies
- Attempt to create a new policy
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 #386497 (closed)
Edited by Dominic Bauer