Skip to content

Feat: Add securityEnabled field switch to Edit Group #4482

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion src/pages/identity/administration/groups/edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ const EditGroup = () => {
}
return null;
})(),
securityEnabled: group.securityEnabled,
// Initialize empty arrays for add/remove actions
AddMember: [],
RemoveMember: [],
Expand All @@ -112,6 +113,7 @@ const EditGroup = () => {
allowExternal: groupInfo?.data?.allowExternal,
sendCopies: groupInfo?.data?.sendCopies,
hideFromOutlookClients: groupInfo?.data?.hideFromOutlookClients,
securityEnabled: group.securityEnabled,
});

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

// Properties that should only be sent if they've changed from initial values
const changeDetectionProperties = ["allowExternal", "sendCopies", "hideFromOutlookClients"];
const changeDetectionProperties = [
"allowExternal",
"sendCopies",
"hideFromOutlookClients",
"securityEnabled",
];

changeDetectionProperties.forEach((property) => {
if (formData[property] === initialValues[property]) {
Expand Down Expand Up @@ -408,6 +415,18 @@ const EditGroup = () => {
/>
</Grid>
)}
{groupType === "Microsoft 365" && (
<Grid size={{ xs: 12 }}>
<CippFormComponent
type="switch"
label="Security Enabled"
name="securityEnabled"
formControl={formControl}
isFetching={groupInfo.isFetching}
disabled={groupInfo.isFetching}
/>
</Grid>
)}
</Grid>
</Box>
)}
Expand Down
Loading