Skip to content

Commit a5ca728

Browse files
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP into dev
2 parents a9ca690 + 2e9a739 commit a5ca728

File tree

10 files changed

+162
-9
lines changed

10 files changed

+162
-9
lines changed

src/components/CippWizard/CippWizardOffboarding.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ export const CippWizardOffboarding = (props) => {
300300
onPreviousStep={onPreviousStep}
301301
onNextStep={onNextStep}
302302
formControl={formControl}
303+
replacementBehaviour="removeNulls"
303304
/>
304305
</Stack>
305306
);

src/components/CippWizard/CippWizardStepButtons.jsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,24 @@ export const CippWizardStepButtons = (props) => {
1313
formControl,
1414
noNextButton = false,
1515
noSubmitButton = false,
16+
replacementBehaviour,
1617
queryKeys,
1718
...other
1819
} = props;
1920
const { isValid, isSubmitted, isSubmitting } = useFormState({ control: formControl.control });
2021
const sendForm = ApiPostCall({ relatedQueryKeys: queryKeys });
2122
const handleSubmit = () => {
2223
const values = formControl.getValues();
23-
sendForm.mutate({ url: postUrl, data: values });
24+
const newData = {};
25+
Object.keys(values).forEach((key) => {
26+
const value = values[key];
27+
if (replacementBehaviour !== "removeNulls") {
28+
newData[key] = value;
29+
} else if (row[value] !== undefined) {
30+
newData[key] = row[value];
31+
}
32+
});
33+
sendForm.mutate({ url: postUrl, data: newData });
2434
};
2535

2636
return (

src/data/alerts.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,17 @@
2222
{
2323
"name": "InactiveLicensedUsers",
2424
"label": "Alert on licensed users that have not logged in for 90 days",
25+
"requiresInput": true,
26+
"inputType": "switch",
27+
"inputLabel": "Exclude disabled users?",
28+
"inputName": "InactiveLicensedUsersExcludeDisabled",
2529
"recommendedRunInterval": "1d"
2630
},
2731
{
2832
"name": "QuotaUsed",
2933
"label": "Alert on % mailbox quota used",
3034
"requiresInput": true,
35+
"inputType": "textField",
3136
"inputLabel": "Enter quota percentage",
3237
"inputName": "QuotaUsedQuota",
3338
"recommendedRunInterval": "4h"
@@ -36,6 +41,7 @@
3641
"name": "SharePointQuota",
3742
"label": "Alert on % SharePoint quota used",
3843
"requiresInput": true,
44+
"inputType": "textField",
3945
"inputLabel": "Enter quota percentage",
4046
"inputName": "SharePointQuotaQuota",
4147
"recommendedRunInterval": "4h"
@@ -85,6 +91,11 @@
8591
"label": "Alert on new Apple Business Manager terms",
8692
"recommendedRunInterval": "30d"
8793
},
94+
{
95+
"name": "AppCertificateExpiry ",
96+
"label": "Alert on expiring application certificates",
97+
"recommendedRunInterval": "1d"
98+
},
8899
{
89100
"name": "ApnCertExpiry",
90101
"label": "Alert on expiring APN certificates",

src/data/standards.json

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,36 @@
4949
"powershellEquivalent": "Enable-OrganizationCustomization",
5050
"recommendedBy": ["CIS"]
5151
},
52+
{
53+
"name": "standards.ProfilePhotos",
54+
"cat": "Global Standards",
55+
"tag": ["lowimpact"],
56+
"helpText": "Controls whether users can set their own profile photos in Microsoft 365.",
57+
"docsDescription": "Controls whether users can set their own profile photos in Microsoft 365. When disabled, only User and Global administrators can update profile photos for users.",
58+
"addedComponent": [
59+
{
60+
"type": "select",
61+
"multiple": false,
62+
"label": "Select value",
63+
"name": "standards.ProfilePhotos.state",
64+
"options": [
65+
{
66+
"label": "Enabled",
67+
"value": "enabled"
68+
},
69+
{
70+
"label": "Disabled",
71+
"value": "disabled"
72+
}
73+
]
74+
}
75+
],
76+
"label": "Allow users to set profile photos",
77+
"impact": "Low Impact",
78+
"impactColour": "info",
79+
"powershellEquivalent": "Set-OrganizationConfig -ProfilePhotoOptions EnablePhotos and Update-MgBetaAdminPeople",
80+
"recommendedBy": []
81+
},
5282
{
5383
"name": "standards.PhishProtection",
5484
"cat": "Global Standards",
@@ -1270,7 +1300,13 @@
12701300
"tag": ["mediumimpact"],
12711301
"helpText": "Sets emails sent as and on behalf of shared mailboxes to also be stored in the shared mailbox sent items folder",
12721302
"docsDescription": "This makes sure that e-mails sent from shared mailboxes or delegate mailboxes, end up in the mailbox of the shared/delegate mailbox instead of the sender, allowing you to keep replies in the same mailbox as the original e-mail.",
1273-
"addedComponent": [],
1303+
"addedComponent": [
1304+
{
1305+
"type": "switch",
1306+
"label": "Include user mailboxes",
1307+
"name": "standards.DelegateSentItems.IncludeUserMailboxes"
1308+
}
1309+
],
12741310
"label": "Set mailbox Sent Items delegation (Sent items for shared mailboxes)",
12751311
"impact": "Medium Impact",
12761312
"impactColour": "warning",

src/layouts/config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,10 @@ export const nativeMenuItems = [
377377
title: "Shared Mailbox with Enabled Account",
378378
path: "/email/reports/SharedMailboxEnabledAccount",
379379
},
380+
{
381+
title: "Global Address List",
382+
path: "/email/reports/global-address-list",
383+
},
380384
],
381385
},
382386
],

src/pages/email/administration/mailboxes/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const Page = () => {
4747
},
4848
{
4949
label: "Hide from Global Address List",
50-
type: "GET",
50+
type: "POST",
5151
url: "/api/ExecHideFromGAL",
5252
data: {
5353
ID: "UPN",
@@ -58,7 +58,7 @@ const Page = () => {
5858
},
5959
{
6060
label: "Unhide from Global Address List",
61-
type: "GET",
61+
type: "POST",
6262
url: "/api/ExecHideFromGAL",
6363
data: {
6464
ID: "UPN",
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
import { Layout as DashboardLayout } from "/src/layouts/index.js";
2+
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
3+
4+
const Page = () => {
5+
const actions = [
6+
{
7+
label: "Unhide from Global Address List",
8+
type: "POST",
9+
url: "/api/ExecHideFromGAL",
10+
data: {
11+
HideFromGAL: false,
12+
ID: "PrimarySmtpAddress",
13+
},
14+
confirmText: "Are you sure you want to show this mailbox in the Global Address List?",
15+
},
16+
{
17+
label: "Hide from Global Address List",
18+
type: "POST",
19+
url: "/api/ExecHideFromGAL",
20+
data: {
21+
HideFromGAL: true,
22+
ID: "PrimarySmtpAddress",
23+
},
24+
confirmText: "Are you sure you want to hide this mailbox from the Global Address List?",
25+
},
26+
];
27+
28+
const offCanvas = {
29+
extendedInfoFields: [
30+
"HiddenFromAddressListsEnabled",
31+
"ExternalDirectoryObjectId",
32+
"DisplayName",
33+
"PrimarySmtpAddress",
34+
"RecipientType",
35+
"RecipientTypeDetails",
36+
"IsDirSynced",
37+
"SKUAssigned",
38+
"EmailAddresses",
39+
],
40+
actions: actions,
41+
};
42+
43+
const filters = [
44+
{
45+
filterName: "Hidden from GAL",
46+
value: [{ id: "HiddenFromAddressListsEnabled", value: "Yes" }],
47+
type: "column",
48+
},
49+
{
50+
filterName: "Shown in GAL",
51+
value: [{ id: "HiddenFromAddressListsEnabled", value: "No" }],
52+
type: "column",
53+
},
54+
{
55+
filterName: "Cloud only mailboxes",
56+
value: [{ id: "IsDirSynced", value: "No" }],
57+
type: "column",
58+
},
59+
];
60+
61+
return (
62+
<CippTablePage
63+
title="Global Address List"
64+
apiUrl="/api/ListGlobalAddressList"
65+
actions={actions}
66+
offCanvas={offCanvas}
67+
filters={filters}
68+
simpleColumns={[
69+
"HiddenFromAddressListsEnabled",
70+
"DisplayName",
71+
"PrimarySmtpAddress",
72+
"RecipientTypeDetails",
73+
"IsDirSynced",
74+
]}
75+
/>
76+
);
77+
};
78+
79+
Page.getLayout = (page) => <DashboardLayout>{page}</DashboardLayout>;
80+
81+
export default Page;

src/pages/tenant/administration/alert-configuration/alert.jsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,21 @@ const AlertWizard = () => {
206206
};
207207

208208
const handleScriptSubmit = (values) => {
209+
const getInputParams = () => {
210+
if (values.command.value.requiresInput) {
211+
return {
212+
[values.command.value.inputName]: values[values.command.value.inputName],
213+
};
214+
}
215+
return {};
216+
};
217+
209218
const postObject = {
210219
RowKey: router.query.clone ? undefined : router.query.id ? router.query.id : undefined,
211220
tenantFilter: values.tenantFilter?.value,
212221
Name: `${values.tenantFilter.value}: ${values.command.label}`,
213222
Command: { value: `Get-CIPPAlert${values.command.value.name}` },
214-
Parameters: {},
223+
Parameters: getInputParams(),
215224
ScheduledTime: Math.floor(new Date().getTime() / 1000) + 60,
216225
Recurrence: values.recurrence,
217226
PostExecution: values.postExecution,
@@ -512,7 +521,7 @@ const AlertWizard = () => {
512521
<Grid item xs={12} md={12}>
513522
{commandValue?.value?.requiresInput && (
514523
<CippFormComponent
515-
type="textField"
524+
type={commandValue.value?.inputType}
516525
name={commandValue.value?.inputName}
517526
formControl={formControl}
518527
label={commandValue.value?.inputLabel}

src/pages/tenant/administration/app-consent-requests/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ const Page = () => {
5252

5353
return (
5454
<CippTablePage
55+
// FIXME: This tableFilter does nothing. It does not change the table data at all, like the code makes it seem like it should. -Bobby
5556
tableFilter={
5657
<Accordion expanded={expanded} onChange={() => setExpanded(!expanded)}>
5758
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
@@ -95,7 +96,7 @@ const Page = () => {
9596
// Filter for showing only pending requests
9697
{
9798
filterName: "Pending requests",
98-
value: [{ id: "requestStatus", value: "Pending" }],
99+
value: [{ id: "requestStatus", value: "InProgress" }],
99100
type: "column",
100101
},
101102
]}

src/pages/tenant/gdap-management/onboarding/start.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ const Page = () => {
205205
});
206206

207207
var missingDefaults = [];
208-
relationshipRoles.forEach((role) => {
209-
if (!cippDefaults?.find((defaultRole) => defaultRole.value === role.roleDefinitionId)) {
208+
cippDefaults.forEach((defaultRole) => {
209+
if (!relationshipRoles?.find((role) => defaultRole.value === role.roleDefinitionId)) {
210210
missingDefaults.push(role);
211211
}
212212
});

0 commit comments

Comments
 (0)