Skip to content

Commit 0352a46

Browse files
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP into dev
2 parents 5831be7 + 48f80f8 commit 0352a46

File tree

3 files changed

+38
-23
lines changed

3 files changed

+38
-23
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,8 @@ yarn-error.log*
2727

2828
# vscode debug logs
2929
debug.log
30-
app.log
30+
app.log
31+
32+
# Cursor IDE
33+
.cursor/rules
34+

src/components/CippComponents/CippAppPermissionBuilder.jsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@ const CippAppPermissionBuilder = ({
7070
setExpanded(newExpanded ? panel : false);
7171
};
7272

73-
const deprecatedServicePrincipals = ["00000002-0000-0000-c000-000000000000"];
73+
const deprecatedServicePrincipals = [
74+
"00000002-0000-0000-c000-000000000000", // Windows Azure Active Directory
75+
"a0c73c16-a7e3-4564-9a95-2bdf47383716", // Microsoft Exchange Online Remote PowerShell
76+
"1b730954-1685-4b74-9bfd-dac224a7b894", // Azure Active Directory PowerShell
77+
];
7478

7579
const currentSelectedSp = useWatch({ control: formControl.control, name: "servicePrincipal" });
7680

@@ -901,7 +905,7 @@ const CippAppPermissionBuilder = ({
901905
)}
902906
</CippOffCanvas>
903907
{calloutMessage && (
904-
<Grid container sx={{ my: 3 }}>
908+
<Grid container>
905909
<Grid size={{ xl: 8, xs: 12 }}>
906910
<Alert variant="outlined" color="info" onClose={() => setCalloutMessage(null)}>
907911
{calloutMessage}
@@ -911,7 +915,7 @@ const CippAppPermissionBuilder = ({
911915
)}
912916

913917
{isDeprecatedSp && (
914-
<Grid container sx={{ my: 3 }}>
918+
<Grid container>
915919
<Grid size={{ xl: 8, xs: 12 }}>
916920
<Alert color="error" icon={<WarningAmberOutlined />}>
917921
{currentSelectedSp.label} is deprecated and cannot be added. Please select a

src/components/CippFormPages/CippAddGroupForm.jsx

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@ import { CippFormCondition } from "/src/components/CippComponents/CippFormCondit
66
import { CippFormDomainSelector } from "../CippComponents/CippFormDomainSelector";
77
import { CippFormUserSelector } from "../CippComponents/CippFormUserSelector";
88

9+
const DynamicMembershipRules = ({ formControl }) => (
10+
<Grid item size={{ xs: 12 }}>
11+
<CippFormComponent
12+
type="textField"
13+
label="Dynamic Group Parameters"
14+
name="membershipRules"
15+
formControl={formControl}
16+
placeholder="Enter dynamic group parameters syntax"
17+
multiline
18+
rows={4}
19+
fullWidth
20+
/>
21+
</Grid>
22+
);
23+
924
const CippAddGroupForm = (props) => {
1025
const { formControl } = props;
1126

@@ -101,25 +116,17 @@ const CippAddGroupForm = (props) => {
101116
/>
102117
</Grid>
103118
</CippFormCondition>
104-
<CippFormCondition
105-
formControl={formControl}
106-
field="groupType"
107-
compareType="contains"
108-
compareValue="dynamic"
109-
>
110-
<Grid item size={{ xs: 12 }}>
111-
<CippFormComponent
112-
type="textField"
113-
label="Dynamic Group Parameters"
114-
name="membershipRules"
115-
formControl={formControl}
116-
placeholder="Enter dynamic group parameters syntax"
117-
multiline
118-
rows={4}
119-
fullWidth
120-
/>
121-
</Grid>
122-
</CippFormCondition>
119+
{["dynamic", "dynamicDistribution", "m365"].map((groupType) => (
120+
<CippFormCondition
121+
key={groupType}
122+
formControl={formControl}
123+
field="groupType"
124+
compareType="is"
125+
compareValue={groupType}
126+
>
127+
<DynamicMembershipRules formControl={formControl} />
128+
</CippFormCondition>
129+
))}
123130
</Grid>
124131
);
125132
};

0 commit comments

Comments
 (0)