Form validation: require at least one attribute
What does this MR do and why?
Form validation: require at least one attribute
Require at least one attribute in order to save a category
References
- original issue, for which this is a follow-up change: Frontend: Hook up category attribute configurat... (#550582 - closed)
- epic: Security Attributes/Context Filtering (&18010)
Screenshots or screen recordings
| Before | After |
|---|---|
required fields: name, selection type |
required fields: name, selection type, at least one attribute |
How to set up and validate locally
git checkout mfluharty-require-at-least-one-attribute-to-save-a-category
echo "Feature.enable(:security_categories_and_attributes)" | gdk rails c
echo "Feature.enable(:security_context_labels)" | gdk rails c
- navigate to a group where you are at least a maintainer =>
Secure=>Security configuration - try to create a new blank category, you should be unable to save the category when it has 0 attributes
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.
Edited by Miranda Fluharty

