Commit 5e662c36 authored by Austin Regnery's avatar Austin Regnery Committed by Enrique Alcántara

Differentiate MR Approval Settings from Approval Rules

Adds a header for Approval settings for greater context
and cleans up the checkbox styling
parent 83b2d4b1
---
title: Updated MR Approvals to specify settings section
merge_request: 54985
author:
type: other
...@@ -53,7 +53,7 @@ be merged, and optionally which users should do the approving. Approvals can be ...@@ -53,7 +53,7 @@ be merged, and optionally which users should do the approving. Approvals can be
If no approval rules are defined, any user can approve a merge request. However, the default If no approval rules are defined, any user can approve a merge request. However, the default
minimum number of required approvers can still be set in the minimum number of required approvers can still be set in the
[project settings for merge request approvals](#merge-request-approvals-project-settings). [settings for merge request approvals](#approval-settings).
You can opt to define one single rule to approve a merge request among the available rules You can opt to define one single rule to approve a merge request among the available rules
or choose more than one with [multiple approval rules](#multiple-approval-rules). or choose more than one with [multiple approval rules](#multiple-approval-rules).
...@@ -278,9 +278,9 @@ else blocking it. Note that the merge request could still be blocked by other co ...@@ -278,9 +278,9 @@ else blocking it. Note that the merge request could still be blocked by other co
such as merge conflicts, [pending discussions](../../discussions/index.md#only-allow-merge-requests-to-be-merged-if-all-threads-are-resolved), such as merge conflicts, [pending discussions](../../discussions/index.md#only-allow-merge-requests-to-be-merged-if-all-threads-are-resolved),
or a [failed CI/CD pipeline](merge_when_pipeline_succeeds.md). or a [failed CI/CD pipeline](merge_when_pipeline_succeeds.md).
### Merge request approvals project settings ### Approval settings
The project settings for Merge request approvals are found by going to The settings for Merge request approvals are found by going to
**Settings > General** and expanding **Merge request approvals**. **Settings > General** and expanding **Merge request approvals**.
#### Prevent overriding default approvals #### Prevent overriding default approvals
......
%fieldset %fieldset
.form-group %legend.h5.gl-border-none
.form-check = _('Approval settings')
= f.check_box :prevent_merge_requests_author_approval, class: 'form-check-input' .gl-form-checkbox-group
= f.label :prevent_merge_requests_author_approval, class: 'form-check-label' do .gl-form-checkbox.custom-control.custom-checkbox
= f.check_box :prevent_merge_requests_author_approval, class: 'custom-control-input'
= f.label :prevent_merge_requests_author_approval, class: 'custom-control-label' do
= _('Prevent MR approvals by author.') = _('Prevent MR approvals by author.')
.form-check .gl-form-checkbox.custom-control.custom-checkbox
= f.check_box :prevent_merge_requests_committers_approval, class: 'form-check-input' = f.check_box :prevent_merge_requests_committers_approval, class: 'custom-control-input'
= f.label :prevent_merge_requests_committers_approval, class: 'form-check-label' do = f.label :prevent_merge_requests_committers_approval, class: 'custom-control-label' do
= _('Prevent MR approvals from users who make commits to the MR.') = _('Prevent MR approvals from users who make commits to the MR.')
.form-check .gl-form-checkbox.custom-control.custom-checkbox
= f.check_box :disable_overriding_approvers_per_merge_request , class: 'form-check-input' = f.check_box :disable_overriding_approvers_per_merge_request , class: 'custom-control-input'
= f.label :disable_overriding_approvers_per_merge_request , class: 'form-check-label' do = f.label :disable_overriding_approvers_per_merge_request , class: 'custom-control-label' do
= _('Prevent users from modifying MR approval rules.') = _('Prevent users from modifying MR approval rules.')
...@@ -8,7 +8,10 @@ ...@@ -8,7 +8,10 @@
.text-center.gl-mt-3 .text-center.gl-mt-3
= sprite_icon('spinner', size: 24, css_class: 'gl-spinner') = sprite_icon('spinner', size: 24, css_class: 'gl-spinner')
- if project.code_owner_approval_required_available? %fieldset.form-group
%legend.h5.gl-border-none
= _('Approval settings')
- if project.code_owner_approval_required_available?
.gl-alert.gl-alert-info.gl-mb-4.fade.in.show{ role: "alert" } .gl-alert.gl-alert-info.gl-mb-4.fade.in.show{ role: "alert" }
%button.js-close.gl-alert-dismiss{ type: "button", 'data-dismiss': "alert", 'aria-label': "Close" } %button.js-close.gl-alert-dismiss{ type: "button", 'data-dismiss': "alert", 'aria-label': "Close" }
%span %span
...@@ -19,36 +22,37 @@ ...@@ -19,36 +22,37 @@
= _('The "Require approval from CODEOWNERS" setting was moved to %{banner_link_start}Protected Branches%{banner_link_end}').html_safe % { banner_link_start: banner_link_start, banner_link_end: '</strong></a>'.html_safe} = _('The "Require approval from CODEOWNERS" setting was moved to %{banner_link_start}Protected Branches%{banner_link_end}').html_safe % { banner_link_start: banner_link_start, banner_link_end: '</strong></a>'.html_safe}
= link_to sprite_icon('question-o'), help_page_path('user/project/protected_branches', anchor: 'protected-branches-approval-by-code-owners'), target: '_blank' = link_to sprite_icon('question-o'), help_page_path('user/project/protected_branches', anchor: 'protected-branches-approval-by-code-owners'), target: '_blank'
.gl-form-checkbox-group.bv-no-focus-ring .gl-form-checkbox-group
.gl-form-checkbox.form-check .gl-form-checkbox.custom-control.custom-checkbox
= form.check_box(:disable_overriding_approvers_per_merge_request, { class: 'form-check-input', disabled: !can_modify_approvers }, false, true) = form.check_box(:disable_overriding_approvers_per_merge_request, { class: 'custom-control-input', disabled: !can_modify_approvers }, false, true)
= form.label :disable_overriding_approvers_per_merge_request, class: 'form-check-label' do = form.label :disable_overriding_approvers_per_merge_request, class: 'custom-control-label' do
%span= _('Allow overrides to approval lists per merge request (MR)') %span= _('Allow overrides to approval lists per merge request (MR)')
= link_to sprite_icon('question-o'), help_page_path('user/project/merge_requests/merge_request_approvals', anchor: 'prevent-overriding-default-approvals'), target: '_blank' = link_to sprite_icon('question-o'), help_page_path('user/project/merge_requests/merge_request_approvals', anchor: 'prevent-overriding-default-approvals'), target: '_blank'
.gl-form-checkbox.form-check .gl-form-checkbox.custom-control.custom-checkbox
= form.check_box :reset_approvals_on_push, class: 'form-check-input' = form.check_box :reset_approvals_on_push, class: 'custom-control-input'
= form.label :reset_approvals_on_push, class: 'form-check-label' do = form.label :reset_approvals_on_push, class: 'custom-control-label' do
%span= _('Require new approvals when new commits are added to an MR.') %span= _('Require new approvals when new commits are added to an MR.')
.gl-form-checkbox.form-check .gl-form-checkbox.custom-control.custom-checkbox
= form.check_box :merge_requests_author_approval, { class: 'form-check-input', disabled: !can_modify_merge_request_author_settings }, false, true = form.check_box :merge_requests_author_approval, { class: 'custom-control-input', disabled: !can_modify_merge_request_author_settings }, false, true
= form.label :merge_requests_author_approval, class: 'form-check-label' do = form.label :merge_requests_author_approval, class: 'custom-control-label' do
%span= _('Prevent MR approvals by the author.') %span= _('Prevent MR approvals by the author.')
= link_to sprite_icon('question-o'), help_page_path('user/project/merge_requests/merge_request_approvals', = link_to sprite_icon('question-o'), help_page_path('user/project/merge_requests/merge_request_approvals',
anchor: 'allowing-merge-request-authors-to-approve-their-own-merge-requests'), target: '_blank' anchor: 'allowing-merge-request-authors-to-approve-their-own-merge-requests'), target: '_blank'
.gl-form-checkbox.form-check .gl-form-checkbox.custom-control.custom-checkbox
= form.check_box :merge_requests_disable_committers_approval, { disabled: !can_modify_merge_request_committer_settings, class: 'form-check-input' } = form.check_box :merge_requests_disable_committers_approval, { disabled: !can_modify_merge_request_committer_settings, class: 'custom-control-input' }
= form.label :merge_requests_disable_committers_approval, class: 'form-check-label' do = form.label :merge_requests_disable_committers_approval, class: 'custom-control-label' do
%span= _('Prevent MR approvals from users who make commits to the MR.') %span= _('Prevent MR approvals from users who make commits to the MR.')
= link_to sprite_icon('question-o'), help_page_path('user/project/merge_requests/merge_request_approvals', = link_to sprite_icon('question-o'), help_page_path('user/project/merge_requests/merge_request_approvals',
anchor: 'allowing-merge-request-authors-to-approve-their-own-merge-requests'), target: '_blank' anchor: 'allowing-merge-request-authors-to-approve-their-own-merge-requests'), target: '_blank'
- if password_authentication_enabled_for_web? - if password_authentication_enabled_for_web?
.gl-form-checkbox.form-check .gl-form-checkbox.custom-control.custom-checkbox
= form.check_box :require_password_to_approve, class: 'form-check-input' = form.check_box :require_password_to_approve, class: 'custom-control-input'
= form.label :require_password_to_approve, class: 'form-check-label' do = form.label :require_password_to_approve, class: 'custom-control-label' do
%span= _('Require user password for approvals.') %span= _('Require user password for approvals.')
= link_to sprite_icon('question-o'), help_page_path('user/project/merge_requests/merge_request_approvals', = link_to sprite_icon('question-o'), help_page_path('user/project/merge_requests/merge_request_approvals',
anchor: 'require-authentication-when-approving-a-merge-request'), target: '_blank' anchor: 'require-authentication-when-approving-a-merge-request'), target: '_blank'
...@@ -3844,6 +3844,9 @@ msgstr "" ...@@ -3844,6 +3844,9 @@ msgstr ""
msgid "Approval rules reset to project defaults" msgid "Approval rules reset to project defaults"
msgstr "" msgstr ""
msgid "Approval settings"
msgstr ""
msgid "ApprovalRuleRemove|%d member" msgid "ApprovalRuleRemove|%d member"
msgid_plural "ApprovalRuleRemove|%d members" msgid_plural "ApprovalRuleRemove|%d members"
msgstr[0] "" msgstr[0] ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment