Commit f21bda6c authored by Phil Hughes's avatar Phil Hughes

Merge branch '337523-update-approval-settings-text' into 'master'

Update the approval settings options text

See merge request gitlab-org/gitlab!67957
parents 244172f3 9d622460
......@@ -954,7 +954,7 @@ POST /projects/:id/merge_requests/:merge_request_iid/approve
| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding) |
| `merge_request_iid` | integer | yes | The IID of the merge request |
| `sha` | string | no | The `HEAD` of the merge request |
| `approval_password` **(PREMIUM)** | string | no | Current user's password. Required if [**Require user password to approve**](../user/project/merge_requests/approvals/settings.md#require-authentication-for-approvals) is enabled in the project settings. |
| `approval_password` **(PREMIUM)** | string | no | Current user's password. Required if [**Require user password to approve**](../user/project/merge_requests/approvals/settings.md#require-user-password-to-approve) is enabled in the project settings. |
The `sha` parameter works in the same way as
when [accepting a merge request](merge_requests.md#accept-mr): if it is passed, then it must
......
......@@ -24,12 +24,12 @@ To enable merge request approval rules for an instance:
Merge request approval rules that can be set at an instance level are:
- **Prevent approval of merge requests by merge request author**. Prevents project
- **Prevent approval by author**. Prevents project
maintainers from allowing request authors to merge their own merge requests.
- **Prevent approval of merge requests by merge request committers**. Prevents project
- **Prevent approvals by users who add commits**. Prevents project
maintainers from allowing users to approve merge requests if they have submitted
any commits to the source branch.
- **Prevent users from modifying merge request approvers list**. Prevents users from
- **Prevent editing approval rules in projects and merge requests**. Prevents users from
modifying the approvers list in project settings or in individual merge requests.
Also read the [project level merge request approval rules](../project/merge_requests/approvals/index.md), which are affected by instance level rules.
......@@ -60,8 +60,8 @@ We support a separation of duties policy between users who create and approve me
The approval status column can help you identify violations of this policy.
Our criteria for the separation of duties is as follows:
- [A merge request author is **not** allowed to approve their merge request](../../project/merge_requests/approvals/settings.md#prevent-authors-from-approving-their-own-work)
- [A merge request committer is **not** allowed to approve a merge request they have added commits to](../../project/merge_requests/approvals/settings.md#prevent-committers-from-approving-their-own-work)
- [A merge request author is **not** allowed to approve their merge request](../../project/merge_requests/approvals/settings.md#prevent-approval-by-author)
- [A merge request committer is **not** allowed to approve a merge request they have added commits to](../../project/merge_requests/approvals/settings.md#prevent-approvals-by-users-who-add-commits)
- [The minimum number of approvals required to merge a merge request is **at least** two](../../project/merge_requests/approvals/rules.md)
The **Approval status** column shows you at a glance whether a merge request is complying with the above.
......
......@@ -42,17 +42,12 @@ rules to define what types of users can approve work. Some examples of rules you
- Users with specific permissions can be allowed or denied the ability
to [override approval rules on a specific merge request](rules.md#edit-or-override-merge-request-approval-rules).
You can also configure additional [settings for merge request approvals](settings.md)
for more control of the level of oversight and security your project needs, including:
You can also configure:
- [Prevent users from overriding a merge request approval rule.](settings.md#prevent-overrides-of-default-approvals)
- [Reset approvals when new code is pushed.](settings.md#reset-approvals-on-push)
- Allow (or disallow) [authors and committers](settings.md) to approve their own merge requests.
- [Require password authentication when approving.](settings.md#require-authentication-for-approvals)
- [Require security team approval.](settings.md#security-approvals-in-merge-requests)
You can configure your merge request approval rules and settings through the GitLab
user interface or with the [Merge request approvals API](../../../../api/merge_request_approvals.md).
- Additional [settings for merge request approvals](settings.md) for more control of the
level of oversight and security your project needs.
- Merge request approval rules and settings through the GitLab UI or with the
[Merge request approvals API](../../../../api/merge_request_approvals.md).
## Approve a merge request
......@@ -74,10 +69,10 @@ such as merge conflicts, [pending discussions](../../../discussions/index.md#pre
or a [failed CI/CD pipeline](../merge_when_pipeline_succeeds.md).
To prevent merge request authors from approving their own merge requests,
enable [**Prevent author approval**](settings.md#prevent-authors-from-approving-their-own-work)
enable [**Prevent author approval**](settings.md#prevent-approval-by-author)
in your project's settings.
If you enable [approval rule overrides](settings.md#prevent-overrides-of-default-approvals),
If you enable [approval rule overrides](settings.md#prevent-editing-approval-rules-in-merge-requests),
merge requests created before a change to default approval rules are not affected.
The only exceptions are changes to the [target branch](rules.md#approvals-for-protected-branches)
of the rule.
......
......@@ -49,7 +49,7 @@ Users of GitLab Premium and higher tiers can create [additional approval rules](
Your configuration for approval rule overrides determines if the new rule is applied
to existing merge requests:
- If [approval rule overrides](settings.md#prevent-overrides-of-default-approvals) are allowed,
- If [approval rule overrides](settings.md#prevent-editing-approval-rules-in-merge-requests) are allowed,
changes to these default rules are not applied to existing merge requests, except for
changes to the [target branch](#approvals-for-protected-branches) of the rule.
- If approval rule overrides are not allowed, all changes to default rules
......@@ -138,10 +138,10 @@ approve in these ways:
counts as one approver, and not two.
- Merge request authors do not count as eligible approvers on their own merge requests by default.
To change this behavior, disable the
[**Prevent author approval**](settings.md#prevent-authors-from-approving-their-own-work)
[**Prevent author approval**](settings.md#prevent-approval-by-author)
project setting.
- Committers to merge requests can approve a merge request. To change this behavior, enable the
[**Prevent committers approval**](settings.md#prevent-committers-from-approving-their-own-work)
[**Prevent committers approval**](settings.md#prevent-approvals-by-users-who-add-commits)
project setting.
### Code owners as eligible approvers **(PREMIUM)**
......@@ -201,7 +201,7 @@ on a merge request, you can either add or remove approvers:
1. Add or remove your desired approval rules.
1. Select **Save changes**.
Administrators can change the [merge request approvals settings](settings.md#prevent-overrides-of-default-approvals)
Administrators can change the [merge request approvals settings](settings.md#prevent-editing-approval-rules-in-merge-requests)
to prevent users from overriding approval rules for merge requests.
## Configure optional approval rules **(PREMIUM)**
......
......@@ -20,37 +20,17 @@ To view or edit merge request approval settings:
1. Go to your project and select **Settings > General**.
1. Expand **Merge request (MR) approvals**.
In this section of general settings, you can configure the settings described
on this page.
In this section of general settings, you can configure the following settings:
## Prevent overrides of default approvals
| Setting | Description |
| ------ | ------ |
| [Prevent approval by author](#prevent-approval-by-author) | When enabled, the author of a merge request cannot approve it. |
| [Prevent approvals by users who add commits](#prevent-approvals-by-users-who-add-commits) | When enabled, users who have committed to a merge request cannot approve it. |
| [Prevent editing approval rules in merge requests](#prevent-editing-approval-rules-in-merge-requests) | When enabled, users can't override the project's approval rules on merge requests. |
| [Require user password to approve](#require-user-password-to-approve) | Force potential approvers to first authenticate with a password. |
| [Remove all approvals when commits are added to the source branch](#remove-all-approvals-when-commits-are-added-to-the-source-branch) | When enabled, remove all existing approvals on a merge request when more changes are added to it. |
By default, users can override the approval rules you [create for a project](rules.md)
on a per-merge request basis. If you don't want users to change approval rules
on merge requests, you can disable this setting:
1. Go to your project and select **Settings > General**.
1. Expand **Merge request (MR) approvals**.
1. Select the **Prevent users from modifying MR approval rules in merge requests** checkbox.
1. Select **Save changes**.
This change affects all open merge requests.
## Reset approvals on push
By default, an approval on a merge request remains in place, even if you add more changes
after the approval. If you want to remove all existing approvals on a merge request
when more changes are added to it:
1. Go to your project and select **Settings > General**.
1. Expand **Merge request (MR) approvals**.
1. Select the **Require new approvals when new commits are added to an MR** checkbox.
1. Select **Save changes**.
Approvals aren't reset when a merge request is [rebased from the UI](../fast_forward_merge.md)
However, approvals are reset if the target branch is changed.
## Prevent authors from approving their own work **(PREMIUM)**
## Prevent approval by author **(PREMIUM)**
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/3349) in GitLab 11.3.
> - Moved to GitLab Premium in 13.9.
......@@ -65,14 +45,14 @@ By default, the author of a merge request cannot approve it. To change this sett
Authors can edit the approval rule in an individual merge request and override
this setting, unless you configure one of these options:
- [Prevent overrides of default approvals](#prevent-overrides-of-default-approvals) at
- [Prevent overrides of default approvals](#prevent-editing-approval-rules-in-merge-requests) at
the project level.
- *(Self-managed instances only)* Prevent overrides of default approvals
[at the instance level](../../../admin_area/merge_requests_approvals.md). When configured
at the instance level, you can't edit this setting at the project or individual
merge request levels.
## Prevent committers from approving their own work **(PREMIUM)**
## Prevent approvals by users who add commits **(PREMIUM)**
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/10441) in GitLab 11.10.
> - Moved to GitLab Premium in 13.9.
......@@ -96,7 +76,20 @@ to a merge request can approve merge requests that affect files they own.
To learn more about the [differences between authors and committers](https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History),
read the official Git documentation for an explanation.
## Require authentication for approvals
## Prevent editing approval rules in merge requests
By default, users can override the approval rules you [create for a project](rules.md)
on a per-merge request basis. If you don't want users to change approval rules
on merge requests, you can disable this setting:
1. Go to your project and select **Settings > General**.
1. Expand **Merge request (MR) approvals**.
1. Select the **Prevent users from modifying MR approval rules in merge requests** checkbox.
1. Select **Save changes**.
This change affects all open merge requests.
## Require user password to approve
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/5981) in GitLab 12.0.
> - Moved to GitLab Premium in 13.9.
......@@ -112,6 +105,20 @@ permission enables an electronic signature for approvals, such as the one define
1. Select the **Require user password for approvals** checkbox.
1. Select **Save changes**.
## Remove all approvals when commits are added to the source branch
By default, an approval on a merge request remains in place, even if you add more changes
after the approval. If you want to remove all existing approvals on a merge request
when more changes are added to it:
1. Go to your project and select **Settings > General**.
1. Expand **Merge request (MR) approvals**.
1. Select the **Require new approvals when new commits are added to an MR** checkbox.
1. Select **Save changes**.
Approvals aren't reset when a merge request is [rebased from the UI](../fast_forward_merge.md)
However, approvals are reset if the target branch is changed.
## Security approvals in merge requests **(ULTIMATE)**
You can require that a member of your security team approves a merge request if a
......
......@@ -20,6 +20,10 @@ export default {
type: String,
required: true,
},
settingsLabels: {
type: Object,
required: true,
},
canPreventMrApprovalRuleEdit: {
type: Boolean,
required: false,
......@@ -77,11 +81,12 @@ export default {
},
},
links: {
preventAuthorApprovalDocsAnchor: 'prevent-authors-from-approving-their-own-work',
preventMrApprovalRuleEditDocsAnchor: 'prevent-overrides-of-default-approvals',
requireUserPasswordDocsAnchor: 'require-authentication-for-approvals',
removeApprovalsOnPushDocsAnchor: 'reset-approvals-on-push',
preventCommittersApprovalDocsAnchor: 'prevent-committers-from-approving-their-own-work',
preventAuthorApprovalDocsAnchor: 'prevent-approval-by-author',
preventCommittersApprovalDocsAnchor: 'prevent-approvals-by-users-who-add-commits',
preventMrApprovalRuleEditDocsAnchor: 'prevent-editing-approval-rules-in-merge-requests',
requireUserPasswordDocsAnchor: 'require-user-password-to-approve',
removeApprovalsOnPushDocsAnchor:
'remove-all-approvals-when-commits-are-added-to-the-source-branch',
},
i18n: APPROVAL_SETTINGS_I18N,
};
......@@ -116,7 +121,7 @@ export default {
<gl-form-group>
<approval-settings-checkbox
v-model="preventAuthorApproval"
:label="$options.i18n.authorApprovalLabel"
:label="settingsLabels.authorApprovalLabel"
:anchor="$options.links.preventAuthorApprovalDocsAnchor"
:locked="!canPreventAuthorApproval"
:locked-text="$options.i18n.lockedByAdmin"
......@@ -124,7 +129,7 @@ export default {
/>
<approval-settings-checkbox
v-model="preventCommittersApproval"
:label="$options.i18n.preventCommittersApprovalLabel"
:label="settingsLabels.preventCommittersApprovalLabel"
:anchor="$options.links.preventCommittersApprovalDocsAnchor"
:locked="!canPreventCommittersApproval"
:locked-text="$options.i18n.lockedByAdmin"
......@@ -132,7 +137,7 @@ export default {
/>
<approval-settings-checkbox
v-model="preventMrApprovalRuleEdit"
:label="$options.i18n.preventMrApprovalRuleEditLabel"
:label="settingsLabels.preventMrApprovalRuleEditLabel"
:anchor="$options.links.preventMrApprovalRuleEditDocsAnchor"
:locked="!canPreventMrApprovalRuleEdit"
:locked-text="$options.i18n.lockedByAdmin"
......@@ -140,13 +145,13 @@ export default {
/>
<approval-settings-checkbox
v-model="requireUserPassword"
:label="$options.i18n.requireUserPasswordLabel"
:label="settingsLabels.requireUserPasswordLabel"
:anchor="$options.links.requireUserPasswordDocsAnchor"
data-testid="require-user-password"
/>
<approval-settings-checkbox
v-model="removeApprovalsOnPush"
:label="$options.i18n.removeApprovalsOnPushLabel"
:label="settingsLabels.removeApprovalsOnPushLabel"
:anchor="$options.links.removeApprovalsOnPushDocsAnchor"
data-testid="remove-approvals-on-push"
/>
......
......@@ -3,6 +3,7 @@ import { GlSprintf, GlLink } from '@gitlab/ui';
import { helpPagePath } from '~/helpers/help_page_helper';
import { __ } from '~/locale';
import SettingsBlock from '~/vue_shared/components/settings/settings_block.vue';
import { GROUP_APPROVAL_SETTINGS_LABELS_I18N } from '../../constants';
import ApprovalSettings from '../approval_settings.vue';
export default {
......@@ -30,6 +31,7 @@ export default {
groupSettingsHeader: __('Merge request approvals'),
groupSettingsDescription: __('Define approval settings. %{linkStart}Learn more.%{linkEnd}'),
},
labels: GROUP_APPROVAL_SETTINGS_LABELS_I18N,
};
</script>
......@@ -46,7 +48,10 @@ export default {
</gl-sprintf>
</template>
<template #default>
<approval-settings :approval-settings-path="approvalSettingsPath" />
<approval-settings
:approval-settings-path="approvalSettingsPath"
:settings-labels="$options.labels"
/>
</template>
</settings-block>
</template>
<script>
import { mapState } from 'vuex';
import { __ } from '~/locale';
import { PROJECT_APPROVAL_SETTINGS_LABELS_I18N } from '../../constants';
import ApprovalSettings from '../approval_settings.vue';
export default {
......@@ -18,6 +19,7 @@ export default {
i18n: {
projectSettingsHeader: __('Approval settings'),
},
labels: PROJECT_APPROVAL_SETTINGS_LABELS_I18N,
};
</script>
......@@ -31,6 +33,7 @@ export default {
:can-prevent-author-approval="canModifyAuthorSettings"
:can-prevent-committers-approval="canModifyCommiterSettings"
:can-prevent-mr-approval-rule-edit="canPreventMrApprovalRuleEdit"
:settings-labels="$options.labels"
/>
</div>
</template>
......@@ -50,17 +50,6 @@ export const APPROVAL_RULE_CONFIGS = {
export const APPROVALS_HELP_PATH = 'user/project/merge_requests/approvals/settings';
export const APPROVAL_SETTINGS_I18N = {
authorApprovalLabel: s__('ApprovalSettings|Prevent MR approvals by the author.'),
preventMrApprovalRuleEditLabel: s__(
'ApprovalSettings|Prevent users from modifying MR approval rules.',
),
preventCommittersApprovalLabel: s__(
'ApprovalSettings|Prevent approval of merge requests by merge request committers.',
),
requireUserPasswordLabel: s__('ApprovalSettings|Require user password for approvals.'),
removeApprovalsOnPushLabel: s__(
'ApprovalSettings|Remove all approvals in a merge request when new commits are pushed to its source branch.',
),
saveChanges: __('Save changes'),
loadingErrorMessage: s__(
'ApprovalSettings|There was an error loading merge request approval settings.',
......@@ -74,6 +63,27 @@ export const APPROVAL_SETTINGS_I18N = {
),
};
export const PROJECT_APPROVAL_SETTINGS_LABELS_I18N = {
authorApprovalLabel: s__('ApprovalSettings|Prevent approval by author.'),
preventMrApprovalRuleEditLabel: s__(
'ApprovalSettings|Prevent editing approval rules in merge requests.',
),
preventCommittersApprovalLabel: s__(
'ApprovalSettings|Prevent approvals by users who add commits.',
),
requireUserPasswordLabel: s__('ApprovalSettings|Require user password to approve.'),
removeApprovalsOnPushLabel: s__(
'ApprovalSettings|Remove all approvals when commits are added to the source branch.',
),
};
export const GROUP_APPROVAL_SETTINGS_LABELS_I18N = {
...PROJECT_APPROVAL_SETTINGS_LABELS_I18N,
preventMrApprovalRuleEditLabel: s__(
'ApprovalSettings|Prevent editing approval rules in projects and merge requests. ',
),
};
export const APPROVAL_DIALOG_I18N = {
form: {
approvalsRequiredLabel: s__('ApprovalRule|Approvals required'),
......
......@@ -5,12 +5,12 @@
.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.')
= s_('ApprovalSettings|Prevent approval by author.')
.gl-form-checkbox.custom-control.custom-checkbox
= f.check_box :prevent_merge_requests_committers_approval, class: 'custom-control-input'
= f.label :prevent_merge_requests_committers_approval, class: 'custom-control-label' do
= _('Prevent MR approvals from users who make commits to the MR.')
= s_('ApprovalSettings|Prevent approvals by users who add commits.')
.gl-form-checkbox.custom-control.custom-checkbox
= f.check_box :disable_overriding_approvers_per_merge_request , class: 'custom-control-input'
= f.label :disable_overriding_approvers_per_merge_request , class: 'custom-control-label' do
= _('Prevent users from modifying MR approval rules in projects and merge requests.')
= s_('ApprovalSettings|Prevent editing approval rules in projects and merge requests.')
......@@ -20,17 +20,17 @@ RSpec.describe 'Admin interacts with merge requests approvals settings' do
it 'updates instance-level merge request approval settings and enforces project-level ones', :js do
page.within('.merge-request-approval-settings') do
check 'Prevent MR approvals by author.'
check 'Prevent MR approvals from users who make commits to the MR.'
check _('Prevent users from modifying MR approval rules in projects and merge requests.')
check 'Prevent approval by author.'
check 'Prevent approvals by users who add commits.'
check _('Prevent editing approval rules in projects and merge requests.')
click_button('Save changes')
end
visit(admin_push_rule_path)
expect(find_field('Prevent MR approvals by author.')).to be_checked
expect(find_field('Prevent MR approvals from users who make commits to the MR.')).to be_checked
expect(find_field(_('Prevent users from modifying MR approval rules in projects and merge requests.'))).to be_checked
expect(find_field('Prevent approval by author.')).to be_checked
expect(find_field('Prevent approvals by users who add commits.')).to be_checked
expect(find_field(_('Prevent editing approval rules in projects and merge requests.'))).to be_checked
visit edit_project_path(project)
......
......@@ -3,7 +3,10 @@ import { createLocalVue, shallowMount } from '@vue/test-utils';
import Vuex from 'vuex';
import ApprovalSettings from 'ee/approvals/components/approval_settings.vue';
import { APPROVAL_SETTINGS_I18N } from 'ee/approvals/constants';
import {
PROJECT_APPROVAL_SETTINGS_LABELS_I18N,
APPROVAL_SETTINGS_I18N,
} from 'ee/approvals/constants';
import { groupApprovalsMappers } from 'ee/approvals/mappers';
import createStore from 'ee/approvals/stores';
import approvalSettingsModule from 'ee/approvals/stores/modules/approval_settings/';
......@@ -43,6 +46,7 @@ describe('ApprovalSettings', () => {
store,
propsData: {
approvalSettingsPath,
settingsLabels: PROJECT_APPROVAL_SETTINGS_LABELS_I18N,
...props,
},
stubs: { GlButton },
......@@ -151,11 +155,11 @@ describe('ApprovalSettings', () => {
describe.each`
testid | action | setting | labelKey | anchor
${'prevent-author-approval'} | ${'setPreventAuthorApproval'} | ${'preventAuthorApproval'} | ${'authorApprovalLabel'} | ${'prevent-authors-from-approving-their-own-work'}
${'prevent-committers-approval'} | ${'setPreventCommittersApproval'} | ${'preventCommittersApproval'} | ${'preventCommittersApprovalLabel'} | ${'prevent-committers-from-approving-their-own-work'}
${'prevent-mr-approval-rule-edit'} | ${'setPreventMrApprovalRuleEdit'} | ${'preventMrApprovalRuleEdit'} | ${'preventMrApprovalRuleEditLabel'} | ${'prevent-overrides-of-default-approvals'}
${'require-user-password'} | ${'setRequireUserPassword'} | ${'requireUserPassword'} | ${'requireUserPasswordLabel'} | ${'require-authentication-for-approvals'}
${'remove-approvals-on-push'} | ${'setRemoveApprovalsOnPush'} | ${'removeApprovalsOnPush'} | ${'removeApprovalsOnPushLabel'} | ${'reset-approvals-on-push'}
${'prevent-author-approval'} | ${'setPreventAuthorApproval'} | ${'preventAuthorApproval'} | ${'authorApprovalLabel'} | ${'prevent-approval-by-author'}
${'prevent-committers-approval'} | ${'setPreventCommittersApproval'} | ${'preventCommittersApproval'} | ${'preventCommittersApprovalLabel'} | ${'prevent-approvals-by-users-who-add-commits'}
${'prevent-mr-approval-rule-edit'} | ${'setPreventMrApprovalRuleEdit'} | ${'preventMrApprovalRuleEdit'} | ${'preventMrApprovalRuleEditLabel'} | ${'prevent-editing-approval-rules-in-merge-requests'}
${'require-user-password'} | ${'setRequireUserPassword'} | ${'requireUserPassword'} | ${'requireUserPasswordLabel'} | ${'require-user-password-to-approve'}
${'remove-approvals-on-push'} | ${'setRemoveApprovalsOnPush'} | ${'removeApprovalsOnPush'} | ${'removeApprovalsOnPushLabel'} | ${'remove-all-approvals-when-commits-are-added-to-the-source-branch'}
`('with the $testid checkbox', ({ testid, action, setting, labelKey, anchor }) => {
let checkbox = null;
......@@ -177,7 +181,7 @@ describe('ApprovalSettings', () => {
it('has the anchor and label props', () => {
expect(checkbox.props()).toMatchObject({
anchor,
label: APPROVAL_SETTINGS_I18N[labelKey],
label: PROJECT_APPROVAL_SETTINGS_LABELS_I18N[labelKey],
});
});
......
......@@ -6,6 +6,7 @@ import Vuex from 'vuex';
import ApprovalSettings from 'ee/approvals/components/approval_settings.vue';
import GroupSettingsApp from 'ee/approvals/components/group_settings/app.vue';
import { GROUP_APPROVAL_SETTINGS_LABELS_I18N } from 'ee/approvals/constants';
import { groupApprovalsMappers } from 'ee/approvals/mappers';
import { createStoreOptions } from 'ee/approvals/stores';
import approvalSettingsModule from 'ee/approvals/stores/modules/approval_settings';
......@@ -76,6 +77,9 @@ describe('EE Approvals Group Settings App', () => {
createWrapper();
expect(findApprovalSettings().exists()).toBe(true);
expect(findApprovalSettings().props('approvalSettingsPath')).toBe(approvalSettingsPath);
expect(findApprovalSettings().props()).toMatchObject({
approvalSettingsPath,
settingsLabels: GROUP_APPROVAL_SETTINGS_LABELS_I18N,
});
});
});
......@@ -3,6 +3,7 @@ import Vue from 'vue';
import Vuex from 'vuex';
import ApprovalSettings from 'ee/approvals/components/approval_settings.vue';
import ProjectApprovalSettings from 'ee/approvals/components/project_settings/project_approval_settings.vue';
import { PROJECT_APPROVAL_SETTINGS_LABELS_I18N } from 'ee/approvals/constants';
import { projectApprovalsMappers } from 'ee/approvals/mappers';
import createStore from 'ee/approvals/stores';
import approvalSettingsModule from 'ee/approvals/stores/modules/approval_settings';
......@@ -46,6 +47,7 @@ describe('ProjectApprovalSettings', () => {
canPreventMrApprovalRuleEdit: true,
canPreventAuthorApproval: false,
canPreventCommittersApproval: true,
settingsLabels: PROJECT_APPROVAL_SETTINGS_LABELS_I18N,
});
});
});
......@@ -4247,19 +4247,25 @@ msgstr ""
msgid "ApprovalSettings|Merge request approval settings have been updated."
msgstr ""
msgid "ApprovalSettings|Prevent MR approvals by the author."
msgid "ApprovalSettings|Prevent approval by author."
msgstr ""
msgid "ApprovalSettings|Prevent approval of merge requests by merge request committers."
msgid "ApprovalSettings|Prevent approvals by users who add commits."
msgstr ""
msgid "ApprovalSettings|Prevent users from modifying MR approval rules."
msgid "ApprovalSettings|Prevent editing approval rules in merge requests."
msgstr ""
msgid "ApprovalSettings|Remove all approvals in a merge request when new commits are pushed to its source branch."
msgid "ApprovalSettings|Prevent editing approval rules in projects and merge requests."
msgstr ""
msgid "ApprovalSettings|Require user password for approvals."
msgid "ApprovalSettings|Prevent editing approval rules in projects and merge requests. "
msgstr ""
msgid "ApprovalSettings|Remove all approvals when commits are added to the source branch."
msgstr ""
msgid "ApprovalSettings|Require user password to approve."
msgstr ""
msgid "ApprovalSettings|There was an error loading merge request approval settings."
......@@ -25230,13 +25236,10 @@ msgstr ""
msgid "Prev"
msgstr ""
msgid "Prevent MR approvals by author."
msgstr ""
msgid "Prevent MR approvals from users who make commits to the MR."
msgid "Prevent adding new members to project membership within this group"
msgstr ""
msgid "Prevent adding new members to project membership within this group"
msgid "Prevent editing approval rules in projects and merge requests."
msgstr ""
msgid "Prevent environment from auto-stopping"
......@@ -25248,9 +25251,6 @@ msgstr ""
msgid "Prevent users from changing their profile name"
msgstr ""
msgid "Prevent users from modifying MR approval rules in projects and merge requests."
msgstr ""
msgid "Prevent users from performing write operations on GitLab while performing maintenance."
msgstr ""
......
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