diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-23 15:08:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-23 15:08:48 +0300 |
commit | 8137303e47baaff97a36396cfb05efc0d99879a2 (patch) | |
tree | 89dc777fd2d63e259e4b8b2d781baf472d3429a0 /app/assets/javascripts/pages | |
parent | 5b1258ee90fb29779d6c9da3f488ebff61e243a3 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/pages')
-rw-r--r-- | app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue | 68 |
1 files changed, 19 insertions, 49 deletions
diff --git a/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue b/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue index 5fa3288bbef..f2bc4796324 100644 --- a/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue +++ b/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue @@ -49,14 +49,10 @@ export default { infrastructureLabel: s__('ProjectSettings|Infrastructure'), infrastructureHelpText: s__('ProjectSettings|Configure your infrastructure.'), monitorLabel: s__('ProjectSettings|Monitor'), - packagesHelpText: s__( - 'ProjectSettings|Every project can have its own space to store its packages. Note: The Package Registry is always visible when a project is public.', - ), packageRegistryHelpText: s__('ProjectSettings|Publish, store, and view packages in a project.'), packageRegistryForEveryoneHelpText: s__( 'ProjectSettings|Anyone can pull packages with a package manager API.', ), - packagesLabel: s__('ProjectSettings|Packages'), packageRegistryLabel: s__('ProjectSettings|Package registry'), packageRegistryForEveryoneLabel: s__( 'ProjectSettings|Allow anyone to pull from Package Registry', @@ -355,9 +351,6 @@ export default { this.visibilityLevel < this.currentSettings.visibilityLevel ); }, - packageRegistryAccessLevelEnabled() { - return this.glFeatures.packageRegistryAccessLevel; - }, packageRegistryEnabled() { return this.packageRegistryAccessLevel > featureAccessLevel.NOT_ENABLED; }, @@ -392,14 +385,12 @@ export default { featureAccessLevel.PROJECT_MEMBERS, this.buildsAccessLevel, ); - if (this.packageRegistryAccessLevelEnabled) { - if ( - this.packageRegistryAccessLevel === featureAccessLevel.EVERYONE || - (this.packageRegistryAccessLevel > featureAccessLevel.EVERYONE && - oldValue === VISIBILITY_LEVEL_PUBLIC_INTEGER) - ) { - this.packageRegistryAccessLevel = featureAccessLevel.PROJECT_MEMBERS; - } + if ( + this.packageRegistryAccessLevel === featureAccessLevel.EVERYONE || + (this.packageRegistryAccessLevel > featureAccessLevel.EVERYONE && + oldValue === VISIBILITY_LEVEL_PUBLIC_INTEGER) + ) { + this.packageRegistryAccessLevel = featureAccessLevel.PROJECT_MEMBERS; } this.wikiAccessLevel = Math.min(featureAccessLevel.PROJECT_MEMBERS, this.wikiAccessLevel); this.snippetsAccessLevel = Math.min( @@ -459,10 +450,7 @@ export default { this.repositoryAccessLevel = featureAccessLevel.EVERYONE; if (this.mergeRequestsAccessLevel > featureAccessLevel.NOT_ENABLED) this.mergeRequestsAccessLevel = featureAccessLevel.EVERYONE; - if ( - this.packageRegistryAccessLevelEnabled && - this.packageRegistryAccessLevel === featureAccessLevel.PROJECT_MEMBERS - ) { + if (this.packageRegistryAccessLevel === featureAccessLevel.PROJECT_MEMBERS) { this.packageRegistryAccessLevel = PACKAGE_REGISTRY_ACCESS_LEVEL_DEFAULT_BY_PROJECT_VISIBILITY[value]; } @@ -488,19 +476,17 @@ export default { this.containerRegistryAccessLevel = featureAccessLevel.EVERYONE; this.highlightChanges(); - } else if (this.packageRegistryAccessLevelEnabled) { - if ( - value === VISIBILITY_LEVEL_PUBLIC_INTEGER && - this.packageRegistryAccessLevel === featureAccessLevel.EVERYONE - ) { - // eslint-disable-next-line prefer-destructuring - this.packageRegistryAccessLevel = FEATURE_ACCESS_LEVEL_ANONYMOUS[0]; - } else if ( - value === VISIBILITY_LEVEL_INTERNAL_INTEGER && - this.packageRegistryAccessLevel === FEATURE_ACCESS_LEVEL_ANONYMOUS[0] - ) { - this.packageRegistryAccessLevel = featureAccessLevel.EVERYONE; - } + } else if ( + value === VISIBILITY_LEVEL_PUBLIC_INTEGER && + this.packageRegistryAccessLevel === featureAccessLevel.EVERYONE + ) { + // eslint-disable-next-line prefer-destructuring + this.packageRegistryAccessLevel = FEATURE_ACCESS_LEVEL_ANONYMOUS[0]; + } else if ( + value === VISIBILITY_LEVEL_INTERNAL_INTEGER && + this.packageRegistryAccessLevel === FEATURE_ACCESS_LEVEL_ANONYMOUS[0] + ) { + this.packageRegistryAccessLevel = featureAccessLevel.EVERYONE; } }, @@ -770,22 +756,6 @@ export default { </p> </project-setting-row> <project-setting-row - v-if="packagesAvailable && !packageRegistryAccessLevelEnabled" - ref="package-settings" - :help-path="packagesHelpPath" - :label="$options.i18n.packagesLabel" - :help-text="$options.i18n.packagesHelpText" - > - <gl-toggle - v-model="packagesEnabled" - class="gl-my-2" - :disabled="!repositoryEnabled" - :label="$options.i18n.packagesLabel" - label-position="hidden" - name="project[packages_enabled]" - /> - </project-setting-row> - <project-setting-row ref="pipeline-settings" :label="$options.i18n.ciCdLabel" :help-text="s__('ProjectSettings|Build, test, and deploy your changes.')" @@ -889,7 +859,7 @@ export default { /> </project-setting-row> <project-setting-row - v-if="packageRegistryAccessLevelEnabled && packagesAvailable" + v-if="packagesAvailable" :help-path="packagesHelpPath" :label="$options.i18n.packageRegistryLabel" :help-text="$options.i18n.packageRegistryHelpText" |