Skip to content
Snippets Groups Projects

#57140: add mailing list schema and models

Compare and Show latest version
15 files
+ 76
36
Compare changes
  • Side-by-side
  • Inline
Files
15
@@ -67,6 +67,11 @@ export default {
required: false,
default: '',
},
mailingListAvailable: {
type: Boolean,
required: false,
default: false,
},
},
data() {
@@ -80,6 +85,7 @@ export default {
wikiAccessLevel: 20,
snippetsAccessLevel: 20,
pagesAccessLevel: 20,
mailingListAccessLevel: 20,
containerRegistryEnabled: true,
lfsEnabled: true,
requestAccessEnabled: true,
@@ -134,6 +140,7 @@ export default {
// When from Internal->Private narrow access for only members
this.pagesAccessLevel = 10;
}
this.mailingListAccessLevel = Math.min(10, this.mailingListAccessLevel);
this.highlightChanges();
} else if (oldValue === visibilityOptions.PRIVATE) {
// if changing away from private, make enabled features more permissive
@@ -144,6 +151,7 @@ export default {
if (this.wikiAccessLevel > 0) this.wikiAccessLevel = 20;
if (this.snippetsAccessLevel > 0) this.snippetsAccessLevel = 20;
if (this.pagesAccessLevel === 10) this.pagesAccessLevel = 20;
if (this.mailingListAccessLevel > 0) this.mailingListAccessLevel = 20;
this.highlightChanges();
}
},
@@ -334,6 +342,18 @@ export default {
name="project[project_feature_attributes][pages_access_level]"
/>
</project-setting-row>
<project-setting-row
v-if="mailingListAvailable"
label="Mailing list"
help-text="Enable a mailing list service for the project"
>
<project-feature-setting
v-model="mailingListAccessLevel"
:options="featureAccessLevelOptions"
name="project[project_feature_attributes][mailing_list_access_level]"
/>
</project-setting-row>
</div>
</div>
</template>
Loading