Skip to content

Modified CippAddGroupForm to add dynamic membership rules for M365 groups #4233

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 3 commits into from
Jun 8, 2025
Merged
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,8 @@ yarn-error.log*

# vscode debug logs
debug.log
app.log
app.log

# Cursor IDE
.cursor/rules

45 changes: 26 additions & 19 deletions src/components/CippFormPages/CippAddGroupForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ import { CippFormCondition } from "/src/components/CippComponents/CippFormCondit
import { CippFormDomainSelector } from "../CippComponents/CippFormDomainSelector";
import { CippFormUserSelector } from "../CippComponents/CippFormUserSelector";

const DynamicMembershipRules = ({ formControl }) => (
<Grid item size={{ xs: 12 }}>
<CippFormComponent
type="textField"
label="Dynamic Group Parameters"
name="membershipRules"
formControl={formControl}
placeholder="Enter dynamic group parameters syntax"
multiline
rows={4}
fullWidth
/>
</Grid>
);

const CippAddGroupForm = (props) => {
const { formControl } = props;

Expand Down Expand Up @@ -101,25 +116,17 @@ const CippAddGroupForm = (props) => {
/>
</Grid>
</CippFormCondition>
<CippFormCondition
formControl={formControl}
field="groupType"
compareType="contains"
compareValue="dynamic"
>
<Grid item size={{ xs: 12 }}>
<CippFormComponent
type="textField"
label="Dynamic Group Parameters"
name="membershipRules"
formControl={formControl}
placeholder="Enter dynamic group parameters syntax"
multiline
rows={4}
fullWidth
/>
</Grid>
</CippFormCondition>
{["dynamic", "dynamicDistribution", "m365"].map((groupType) => (
<CippFormCondition
key={groupType}
formControl={formControl}
field="groupType"
compareType="is"
compareValue={groupType}
>
<DynamicMembershipRules formControl={formControl} />
</CippFormCondition>
))}
</Grid>
);
};
Expand Down
Loading