Skip to content

Commit 7ee71e9

Browse files
Merge pull request KelvinTegelaar#6289 from luimen6/feat/more-group-template-params
feat: add email aliases and hide-from-GAL to group templates
2 parents 4995dea + d48c025 commit 7ee71e9

4 files changed

Lines changed: 90 additions & 0 deletions

File tree

src/components/CippFormPages/CippAddGroupForm.jsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,33 @@ const CippAddGroupForm = (props) => {
131131
/>
132132
</Grid>
133133
</CippFormCondition>
134+
<CippFormCondition
135+
formControl={formControl}
136+
field="groupType"
137+
compareType="isOneOf"
138+
compareValue={['distribution', 'security']}
139+
>
140+
<Grid size={{ xs: 12 }}>
141+
<CippFormComponent
142+
type="textField"
143+
label="Email Aliases"
144+
placeholder="One alias per line, e.g. postmaster@%tenantfilter%"
145+
name="aliases"
146+
formControl={formControl}
147+
multiline
148+
rows={4}
149+
fullWidth
150+
/>
151+
</Grid>
152+
<Grid size={{ xs: 12 }}>
153+
<CippFormComponent
154+
type="switch"
155+
label="Hide this group from the Global Address List (GAL)"
156+
name="hideFromGAL"
157+
formControl={formControl}
158+
/>
159+
</Grid>
160+
</CippFormCondition>
134161
<CippFormCondition
135162
formControl={formControl}
136163
field="groupType"

src/components/CippFormPages/CippAddGroupTemplateForm.jsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,33 @@ const CippAddGroupTemplateForm = (props) => {
9797
/>
9898
</Grid>
9999
</CippFormCondition>
100+
<CippFormCondition
101+
formControl={formControl}
102+
field="groupType"
103+
compareType="isOneOf"
104+
compareValue={["distribution", "security"]}
105+
>
106+
<Grid size={{ xs: 12 }}>
107+
<CippFormComponent
108+
type="textField"
109+
label="Email Aliases"
110+
placeholder="One alias per line, e.g. postmaster@%tenantfilter%"
111+
name="aliases"
112+
formControl={formControl}
113+
multiline
114+
rows={4}
115+
fullWidth
116+
/>
117+
</Grid>
118+
<Grid size={{ xs: 12 }}>
119+
<CippFormComponent
120+
type="switch"
121+
label="Hide this group from the Global Address List (GAL)"
122+
name="hideFromGAL"
123+
formControl={formControl}
124+
/>
125+
</Grid>
126+
</CippFormCondition>
100127
<CippFormCondition
101128
formControl={formControl}
102129
field="groupType"

src/components/CippWizard/CippWizardGroupTemplates.jsx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ export const CippWizardGroupTemplates = (props) => {
4444
formControl.setValue("licenses", watcher.addedFields.licenses || [], {
4545
shouldValidate: true,
4646
});
47+
formControl.setValue("aliases", watcher.addedFields.aliases, {
48+
shouldValidate: true,
49+
});
50+
formControl.setValue('hideFromGAL', watcher.addedFields.hideFromGAL, {
51+
shouldValidate: true,
52+
});
4753

4854
console.log("Set membershipRules to:", watcher.addedFields.membershipRules);
4955
}, 100);
@@ -75,6 +81,8 @@ export const CippWizardGroupTemplates = (props) => {
7581
allowExternal: "allowExternal",
7682
membershipRules: "membershipRules",
7783
licenses: "licenses",
84+
aliases: "aliases",
85+
hideFromGAL: "hideFromGAL",
7886
},
7987
showRefresh: true,
8088
}}
@@ -146,6 +154,32 @@ export const CippWizardGroupTemplates = (props) => {
146154
/>
147155
</Grid>
148156
</CippFormCondition>
157+
<CippFormCondition
158+
field="groupType"
159+
compareType="isOneOf"
160+
compareValue={["distribution", "security"]}
161+
formControl={formControl}
162+
>
163+
<Grid size={12}>
164+
<CippFormComponent
165+
type="textField"
166+
name="aliases"
167+
label="Email Aliases"
168+
placeholder="One alias per line, e.g. postmaster@%tenantfilter%"
169+
formControl={formControl}
170+
multiline
171+
rows={4}
172+
/>
173+
</Grid>
174+
<Grid size={12}>
175+
<CippFormComponent
176+
type="switch"
177+
name="hideFromGAL"
178+
label="Hide this group from the Global Address List (GAL)"
179+
formControl={formControl}
180+
/>
181+
</Grid>
182+
</CippFormCondition>
149183
</Grid>
150184

151185
<CippWizardStepButtons

src/pages/identity/administration/group-templates/edit.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ const Page = () => {
4444
groupType: templateData.groupType,
4545
membershipRules: templateData.membershipRules,
4646
allowExternal: templateData.allowExternal,
47+
aliases: templateData.aliases,
48+
hideFromGAL: templateData.hideFromGAL,
4749
licenses: templateData.licenses || [],
4850
tenantFilter: userSettingsDefaults.currentTenant,
4951
});

0 commit comments

Comments
 (0)