Move EE differences for `app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue`
The file app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue
has differences between CE and EE.
Diferences
diff --git a/home/yorickpeterse/Projects/gitlab/gdk-ce/gitlab/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue
index 19d9903c988..0c1ad372449 100644
--- a/home/yorickpeterse/Projects/gitlab/gdk-ce/gitlab/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue
+++ b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue
@@ -37,6 +37,11 @@ export default {
required: false,
default: false,
},
+ packagesAvailable: {
+ type: Boolean,
+ required: false,
+ default: false,
+ },
visibilityHelpPath: {
type: String,
required: false,
@@ -67,6 +72,11 @@ export default {
required: false,
default: '',
},
+ packagesHelpPath: {
+ type: String,
+ required: false,
+ default: '',
+ },
},
data() {
@@ -82,6 +92,7 @@ export default {
pagesAccessLevel: 20,
containerRegistryEnabled: true,
lfsEnabled: true,
+ packagesEnabled: true,
requestAccessEnabled: true,
highlightChangesClass: false,
};
@@ -157,12 +168,14 @@ export default {
if (value === 0) {
this.containerRegistryEnabled = false;
this.lfsEnabled = false;
+ this.packagesEnabled = false;
}
} else if (oldValue === 0) {
this.mergeRequestsAccessLevel = value;
this.buildsAccessLevel = value;
this.containerRegistryEnabled = true;
this.lfsEnabled = true;
+ this.packagesEnabled = true;
}
},
@@ -304,6 +317,18 @@ export default {
name="project[lfs_enabled]"
/>
</project-setting-row>
+ <project-setting-row
+ v-if="packagesAvailable"
+ :help-path="packagesHelpPath"
+ label="Packages"
+ help-text="Every project can have its own space to store its packages"
+ >
+ <project-feature-toggle
+ v-model="packagesEnabled"
+ :disabled-input="!repositoryEnabled"
+ name="project[packages_enabled]"
+ />
+ </project-setting-row>
</div>
<project-setting-row label="Wiki" help-text="Pages for project documentation">
<project-feature-setting
What needs to be done
- Create an EE mixin & a CE counterpart
- Safeguard the template with ifEE