Update UI text for push rules

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 image.png image.png
Group settings - admin user image.png image.png
Group settings - non-admin user image.png Same as above
Project settings - admin user image.png image.png
Project settings - non-admin user image.png Same as above

How to set up and validate locally

  1. Start an instance
  2. Log in as an admin user
  3. Visit the push rules in the admin area http://127.0.0.1:3000/admin/push_rule
  4. 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.
  5. Visit the push rules in a group http://127.0.0.1:3000/groups/toolbox/-/settings/repository#js-push-rules
  6. Deselect one push rule, "Reject inconsistent user name", and then click save. Observe the group settings page again.
  7. 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.
  8. Impersonate as a group owner of the group, repeat step 5
  9. 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.

Edited by Chiang Fong Lee

Merge request reports

Loading