Update UI text for push rules
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
What does this MR do and why?
Update UI text for push rules
The UI text for push rules in the admin area, group settings, and project settings was based on a previous model (I believe during versions 10.0-13.10) where enabling global push rules for the instance would block project owners from overriding it for the project, and require them to get an admin to override it. The current UI text references to "Contact an admin to change this setting." confuses group/project owners who, when they are viewing the group/project settings, actually are allowed to modify (and override/disable) the push rule.
Update the UI text to match the current implementation where an admin is no longer required to make this change.
Changelog: changed
EE: true
References
#356490 - enhancement request due to confusing wording
Screenshots or screen recordings
| Before | After | |
|---|---|---|
| Admin area - admin user | ![]() |
![]() |
| Group settings - admin user | ![]() |
![]() |
| Group settings - non-admin user | ![]() |
Same as above |
| Project settings - admin user | ![]() |
![]() |
| Project settings - non-admin user | ![]() |
Same as above |
How to set up and validate locally
- Start an instance
- Log in as an admin user
- Visit the push rules in the admin area
http://127.0.0.1:3000/admin/push_rule - Select two push rules, "Reject inconsistent user name", and "Reject unsigned commits" to enable the checkboxes, and then click save. Observe the admin area push rules page.
- Visit the push rules in a group
http://127.0.0.1:3000/groups/toolbox/-/settings/repository#js-push-rules - Deselect one push rule, "Reject inconsistent user name", and then click save. Observe the group settings page again.
- Visit the push rules in a project
http://127.0.0.1:3000/toolbox/gitlab-smoke-tests/-/settings/repository#js-push-rules. Observe the project settings page. - Impersonate as a group owner of the group, repeat step 5
- Impersonate as a group owner of a group that contains the project, repeat step 7
Note: this set of screenshots assumes that the group and the project do not have any push rules created. The URLs suggested above for a freshly seeded local instance fit this assumption.
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.







