Skip to content

Commit 963a331

Browse files
Merge pull request #4482 from kris6673/issue4480
Feat: Add securityEnabled field switch to Edit Group
2 parents d0b674e + 361ed58 commit 963a331

File tree

1 file changed

+20
-1
lines changed
  • src/pages/identity/administration/groups

1 file changed

+20
-1
lines changed

src/pages/identity/administration/groups/edit.jsx

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ const EditGroup = () => {
9898
}
9999
return null;
100100
})(),
101+
securityEnabled: group.securityEnabled,
101102
// Initialize empty arrays for add/remove actions
102103
AddMember: [],
103104
RemoveMember: [],
@@ -112,6 +113,7 @@ const EditGroup = () => {
112113
allowExternal: groupInfo?.data?.allowExternal,
113114
sendCopies: groupInfo?.data?.sendCopies,
114115
hideFromOutlookClients: groupInfo?.data?.hideFromOutlookClients,
116+
securityEnabled: group.securityEnabled,
115117
});
116118

117119
// Reset the form with all values
@@ -125,7 +127,12 @@ const EditGroup = () => {
125127
const cleanedData = { ...formData };
126128

127129
// Properties that should only be sent if they've changed from initial values
128-
const changeDetectionProperties = ["allowExternal", "sendCopies", "hideFromOutlookClients"];
130+
const changeDetectionProperties = [
131+
"allowExternal",
132+
"sendCopies",
133+
"hideFromOutlookClients",
134+
"securityEnabled",
135+
];
129136

130137
changeDetectionProperties.forEach((property) => {
131138
if (formData[property] === initialValues[property]) {
@@ -408,6 +415,18 @@ const EditGroup = () => {
408415
/>
409416
</Grid>
410417
)}
418+
{groupType === "Microsoft 365" && (
419+
<Grid size={{ xs: 12 }}>
420+
<CippFormComponent
421+
type="switch"
422+
label="Security Enabled"
423+
name="securityEnabled"
424+
formControl={formControl}
425+
isFetching={groupInfo.isFetching}
426+
disabled={groupInfo.isFetching}
427+
/>
428+
</Grid>
429+
)}
411430
</Grid>
412431
</Box>
413432
)}

0 commit comments

Comments
 (0)