Compliance Center > Edit Framework > Block users from creating more than 50 requirements per framework
What does this MR do and why?
Add limit to creating requirements in UI
We want to block users from creating more than 50 requirements per framework in the UI.
References
- Noted here
- Handbook link: https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/compliance-frameworks/#constraints
Screenshots or screen recordings
| Before | After |
|---|---|
| Screen_Recording_2025-03-28_at_5.53.31_PM | Screen_Recording_2025-03-28_at_5.52.02_PM |
How to set up and validate locally
- Enable the feature flag
Feature.enable(:enable_standards_adherence_dashboard_v2)
- Head to the Compliance center
- Click on
New frameworkand create a new framework - Head to the Compliance center
- Edit your new framework
- In the requirements section, click on
New requirement - Add a name and description
- In a rails console:
requirement = ComplianceManagement::ComplianceFramework::ComplianceRequirement.last
1.upto(49) do |x|
new_requirement = requirement.dup
new_requirement.name = "#{new_requirement.name} #{x}"
new_requirement.save!
end
- Refresh the edit framework page and verify that there are 50 requirements and the
New frameworkbutton is disabled and has the tooltip.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
