Skip to content
代码片段 群组 项目
未验证 提交 9a9d91a0 编辑于 作者: Alexander Turinske's avatar Alexander Turinske 提交者: GitLab
浏览文件

Merge branch '457520-remove-extra-info-about-scoping-policy' into 'master'

Remove extra informaton about policy scoping in policy editor

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/152252



Merged-by: default avatarAlexander Turinske <aturinske@gitlab.com>
Approved-by: default avatarAlexander Turinske <aturinske@gitlab.com>
Reviewed-by: default avatarArtur Fedorov <afedorov@gitlab.com>
Co-authored-by: default avatarAlan (Maciej) Paruszewski <mparuszewski@gitlab.com>
No related branches found
No related tags found
无相关合并请求
<script>
import { GlAlert, GlFormGroup, GlFormSelect } from '@gitlab/ui';
import { s__ } from '~/locale';
import { NAMESPACE_TYPES } from '../../constants';
import { POLICY_TYPE_COMPONENT_OPTIONS } from '../constants';
import PipelineExecutionPolicyEditor from './pipeline_execution/editor_component.vue';
......@@ -57,22 +56,11 @@ export default {
},
},
NAMESPACE_TYPES,
i18n: {
groupPolicyMessage: s__(
'SecurityOrchestration|After enabling a group-level policy, this policy automatically applies to all projects and sub-groups in this group.',
),
},
};
</script>
<template>
<section class="policy-editor">
<span
v-if="namespaceType === $options.NAMESPACE_TYPES.GROUP"
data-testid="group-level-notification"
>
{{ $options.i18n.groupPolicyMessage }}
</span>
<gl-alert
v-if="error"
class="gl-mt-5 security-policies-alert gl-z-2"
......
......@@ -6,7 +6,7 @@ export const SPECIFIC_PROJECTS = 'specific_projects';
export const PROJECT_SCOPE_TYPE_TEXTS = {
[PROJECTS_WITH_FRAMEWORK]: s__('SecurityOrchestration|projects with compliance frameworks'),
[ALL_PROJECTS_IN_GROUP]: s__('SecurityOrchestration|all projects in this group'),
[ALL_PROJECTS_IN_GROUP]: s__('SecurityOrchestration|all subgroups/projects in this group'),
[SPECIFIC_PROJECTS]: s__('SecurityOrchestration|specific projects'),
};
......
......@@ -14,7 +14,6 @@ import { mockDastScanExecutionObject } from '../../mocks/mock_scan_execution_pol
describe('EditorWrapper component', () => {
let wrapper;
const findGroupLevelNotification = () => wrapper.findByTestId('group-level-notification');
const findErrorAlert = () => wrapper.findByTestId('error-alert');
const findPipelineExecutionPolicyEditor = () =>
wrapper.findComponent(PipelineExecutionPolicyEditor);
......@@ -41,9 +40,8 @@ describe('EditorWrapper component', () => {
beforeEach(factory);
it.each`
component | findComponent
${'group-level alert'} | ${findGroupLevelNotification}
${'error alert'} | ${findErrorAlert}
component | findComponent
${'error alert'} | ${findErrorAlert}
`('does not display the $component', ({ findComponent }) => {
expect(findComponent().exists()).toBe(false);
});
......@@ -87,16 +85,6 @@ describe('EditorWrapper component', () => {
},
);
});
describe('group-level', () => {
beforeEach(() => {
factory({ provide: { namespaceType: NAMESPACE_TYPES.GROUP } });
});
it('does display the group-level alert', () => {
expect(findGroupLevelNotification().exists()).toBe(true);
});
});
});
describe('when there is existingPolicy attached', () => {
......
......@@ -46629,9 +46629,6 @@ msgstr ""
msgid "SecurityOrchestration|After dismissing the alert, the information will never be shown again."
msgstr ""
 
msgid "SecurityOrchestration|After enabling a group-level policy, this policy automatically applies to all projects and sub-groups in this group."
msgstr ""
msgid "SecurityOrchestration|All projects in the group."
msgstr ""
 
......@@ -47312,7 +47309,7 @@ msgstr ""
msgid "SecurityOrchestration|all namespaces"
msgstr ""
 
msgid "SecurityOrchestration|all projects in this group"
msgid "SecurityOrchestration|all subgroups/projects in this group"
msgstr ""
 
msgid "SecurityOrchestration|any"
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册