Skip to content

Add instance setting to manage default branch protection in groups

What does this MR do?

For #211944 (closed), part 2.

A detailed note on how the proposed feature should function is noted here

Part 1: !29879 (merged).

The required database column for this change was already added in !29397 (merged)

Changes made

In Part 1, we made all the requires changes and introduced new policies in CE.

This MR contains only EE specific changes, and prevents the policies introduced in CE, based on the requirement of the feature, as mentioned in #211944 (closed).

  • Allow to change the setting from group_owners_can_manage_default_branch_protection from admin/application_settings/general
  • Expose the setting via Application Settings API (GET/PUT)
  • Based on the value of the group_owners_can_manage_default_branch_protection setting and the availability of the Licensed feature, allow or prevent owners changing the default branch protection of the group. (Instance admins will always be allowed to change default branch protection of groups)

Screenshots

Screenshot_2020-04-28_at_10.30.25_AM

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Manoj M J

Merge request reports