Add CSP framework indicators in UI
What does this MR do and why?
This MR adds visual indicators in the GitLab UI to distinguish between instance-level CSP (Compliance Security Policy) frameworks and group-level compliance frameworks, improving user experience and clarity when working with compliance frameworks.
What this MR changes:
- Adds CSP framework detection logic to
framework_badge.vuecomponent using namespace ID comparison - Enhances compliance framework dropdown with CSP differentiation indicators
- Updates GraphQL queries to include
namespaceIdfield for framework identification - Implements visual indicators showing "Instance level compliance framework" text for CSP frameworks
- Adds comprehensive test coverage for CSP framework detection scenarios
- Updates helper methods to provide namespace ID context to frontend components
Why this change is needed:
- Users need to clearly distinguish between instance-level CSP frameworks and group-level frameworks
- Improves compliance workflow clarity by providing visual context about framework scope
- Enhances user experience when managing compliance frameworks across different organizational levels
- Supports better decision-making when applying compliance frameworks to projects
Related Issues
Relates to #560229 (closed)
Steps to Verify
-
Set up test environment with CSP frameworks:
- Ensure you have instance-level CSP frameworks configured
- Create group-level compliance frameworks for comparison
- Have projects with both types of frameworks applied
-
Test framework badge component:
- Navigate to compliance dashboard or project compliance view
- Hover over framework badges to see popover details
- Verify CSP frameworks show "Instance level compliance framework" indicator
- Confirm group-level frameworks do not show the CSP indicator
-
Test compliance framework dropdown:
- Go to security policy editor or compliance framework selection
- Open the compliance framework dropdown
- Verify CSP frameworks display with the instance-level indicator
- Confirm proper visual differentiation between framework types
Screenshots/Recordings
Compliance center labels:
Compliance_center___Gitlab_Org___GitLab
Policy editor framework labels:
Edited by Nate Rosandich