Skip to content
Snippets Groups Projects

Protected containers: Remove field "Minimum access level for delete"

1 unresolved thread
7 files
+ 5
85
Compare changes
  • Side-by-side
  • Inline
Files
7
  • - During rollout of the feature "Protected containers", we noticed
      that the field "Minimum access level for delete" is visible, but
      the aspect delete protection has not been implemented yet;
      therefore, the existence / visibility of
      the field "Minimum access level for delete" might lead to unnecessary
      confusion.
    - This MR intends to remove the field "Minimum access level for delete"
      from the frontend as suggested here: #480385 (comment 2193605295)
    
    Changelog: other
@@ -12,7 +12,6 @@ import HelpPageLink from '~/vue_shared/components/help_page_link/help_page_link.
@@ -12,7 +12,6 @@ import HelpPageLink from '~/vue_shared/components/help_page_link/help_page_link.
import createProtectionRuleMutation from '~/packages_and_registries/settings/project/graphql/mutations/create_container_protection_rule.mutation.graphql';
import createProtectionRuleMutation from '~/packages_and_registries/settings/project/graphql/mutations/create_container_protection_rule.mutation.graphql';
import { s__, __ } from '~/locale';
import { s__, __ } from '~/locale';
const GRAPHQL_ACCESS_LEVEL_VALUE_NULL = null;
const GRAPHQL_ACCESS_LEVEL_VALUE_MAINTAINER = 'MAINTAINER';
const GRAPHQL_ACCESS_LEVEL_VALUE_MAINTAINER = 'MAINTAINER';
const GRAPHQL_ACCESS_LEVEL_VALUE_OWNER = 'OWNER';
const GRAPHQL_ACCESS_LEVEL_VALUE_OWNER = 'OWNER';
const GRAPHQL_ACCESS_LEVEL_VALUE_ADMIN = 'ADMIN';
const GRAPHQL_ACCESS_LEVEL_VALUE_ADMIN = 'ADMIN';
@@ -42,7 +41,6 @@ export default {
@@ -42,7 +41,6 @@ export default {
protectionRuleFormData: {
protectionRuleFormData: {
repositoryPathPattern: '',
repositoryPathPattern: '',
minimumAccessLevelForPush: GRAPHQL_ACCESS_LEVEL_VALUE_MAINTAINER,
minimumAccessLevelForPush: GRAPHQL_ACCESS_LEVEL_VALUE_MAINTAINER,
minimumAccessLevelForDelete: GRAPHQL_ACCESS_LEVEL_VALUE_MAINTAINER,
},
},
updateInProgress: false,
updateInProgress: false,
alertErrorMessages: [],
alertErrorMessages: [],
@@ -66,12 +64,10 @@ export default {
@@ -66,12 +64,10 @@ export default {
projectPath: this.projectPath,
projectPath: this.projectPath,
repositoryPathPattern: this.protectionRuleFormData.repositoryPathPattern,
repositoryPathPattern: this.protectionRuleFormData.repositoryPathPattern,
minimumAccessLevelForPush: this.protectionRuleFormData.minimumAccessLevelForPush,
minimumAccessLevelForPush: this.protectionRuleFormData.minimumAccessLevelForPush,
minimumAccessLevelForDelete: this.protectionRuleFormData.minimumAccessLevelForDelete,
};
};
},
},
minimumAccessLevelOptions() {
minimumAccessLevelOptions() {
return [
return [
{ value: GRAPHQL_ACCESS_LEVEL_VALUE_NULL, text: __('Developer (default)') },
{ value: GRAPHQL_ACCESS_LEVEL_VALUE_MAINTAINER, text: __('Maintainer') },
{ value: GRAPHQL_ACCESS_LEVEL_VALUE_MAINTAINER, text: __('Maintainer') },
{ value: GRAPHQL_ACCESS_LEVEL_VALUE_OWNER, text: __('Owner') },
{ value: GRAPHQL_ACCESS_LEVEL_VALUE_OWNER, text: __('Owner') },
{ value: GRAPHQL_ACCESS_LEVEL_VALUE_ADMIN, text: __('Admin') },
{ value: GRAPHQL_ACCESS_LEVEL_VALUE_ADMIN, text: __('Admin') },
@@ -170,19 +166,6 @@ export default {
@@ -170,19 +166,6 @@ export default {
/>
/>
</gl-form-group>
</gl-form-group>
<gl-form-group
:label="s__('ContainerRegistry|Minimum access level for delete')"
label-for="input-minimum-access-level-for-delete"
:disabled="isFieldDisabled"
>
<gl-form-select
id="input-minimum-access-level-for-delete"
v-model="protectionRuleFormData.minimumAccessLevelForDelete"
:options="minimumAccessLevelOptions"
:disabled="isFieldDisabled"
/>
</gl-form-group>
<div class="gl-flex gl-justify-start">
<div class="gl-flex gl-justify-start">
<gl-button
<gl-button
variant="confirm"
variant="confirm"
Loading