Skip to content

Display error when user lacks permission to create policy project

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

After

How to set up and validate locally

  1. Create a new project
  2. Navigate to Settings > General
  3. Expand the "Permissions" section. In the "Roles allowed to create projects" dropdown, select the "No one" option.
  4. Navigate to Security & Compliance > Policies
  5. 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.

Related to #386497 (closed)

Edited by Dominic Bauer

Merge request reports