Skip to content

Commit 4a86f5d

Browse files
authored
Merge pull request #657 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents 7eb2657 + 802ce83 commit 4a86f5d

File tree

6 files changed

+148
-28
lines changed

6 files changed

+148
-28
lines changed

cspell.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
"cipp",
1515
"CIPP",
1616
"CIPP-API",
17+
"CISA",
1718
"Datto",
1819
"DMARC",
20+
"EIDSCA",
1921
"Entra",
2022
"ESET",
2123
"GDAP",

src/components/CippStandards/CippStandardAccordion.jsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import {
3030
} from "@mui/icons-material";
3131
import { Grid } from "@mui/system";
3232
import CippFormComponent from "/src/components/CippComponents/CippFormComponent";
33-
import { useWatch } from "react-hook-form";
33+
import { useWatch, useFormState } from "react-hook-form";
3434
import _ from "lodash";
3535
import Microsoft from "../../icons/iconly/bulk/microsoft";
3636
import Azure from "../../icons/iconly/bulk/azure";
@@ -108,6 +108,8 @@ const CippStandardAccordion = ({
108108
control: formControl.control,
109109
});
110110

111+
const { errors: formErrors } = useFormState({ control: formControl.control });
112+
111113
// Watch all trackDrift values for all standards at once
112114
const allTrackDriftValues = useWatch({
113115
control: formControl.control,
@@ -568,19 +570,19 @@ const CippStandardAccordion = ({
568570
if (templateList && templateList.label) {
569571
templateDisplayName = templateList.label;
570572
}
571-
573+
572574
// Check for TemplateList-Tags selection (takes priority)
573575
const templateListTags = _.get(watchedValues, `${standardName}.TemplateList-Tags`);
574576
if (templateListTags && templateListTags.label) {
575577
templateDisplayName = templateListTags.label;
576578
}
577579
}
578-
580+
579581
// For multiple standards, check the first added component
580582
const selectedTemplateName = standard.multiple
581583
? _.get(watchedValues, `${standardName}.${standard.addedComponent?.[0]?.name}`)
582584
: "";
583-
585+
584586
// Build accordion title with template name if available
585587
const accordionTitle = templateDisplayName
586588
? `${standard.label} - ${templateDisplayName}`
@@ -674,11 +676,16 @@ const CippStandardAccordion = ({
674676
const hasAction =
675677
actionValue && (!Array.isArray(actionValue) || actionValue.length > 0);
676678

679+
// Check if this standard has any validation errors
680+
const standardErrors = _.get(formErrors, standardName);
681+
const hasValidationErrors = standardErrors && Object.keys(standardErrors).length > 0;
682+
677683
// Allow saving if:
678684
// 1. Action is selected if required
679685
// 2. All required fields are filled
680686
// 3. There are unsaved changes
681-
const canSave = hasAction && requiredFieldsFilled && hasUnsaved;
687+
// 4. No validation errors
688+
const canSave = hasAction && requiredFieldsFilled && hasUnsaved && !hasValidationErrors;
682689

683690
return (
684691
<Card key={standardName} sx={{ mb: 2 }}>

src/components/CippTable/CIPPTableToptoolbar.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,6 +1269,7 @@ export const CIPPTableToptoolbar = ({
12691269
api={actionData.action}
12701270
row={actionData.data}
12711271
relatedQueryKeys={queryKeys}
1272+
{...actionData.action}
12721273
/>
12731274
)}
12741275

src/components/actions-menu.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export const ActionsMenu = (props) => {
9292
api={actionData.action}
9393
row={actionData.data}
9494
relatedQueryKeys={queryKeys}
95+
{...actionData.action}
9596
/>
9697
)}
9798
</>

src/data/standards.json

Lines changed: 131 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,11 @@
866866
"type": "number",
867867
"name": "standards.NudgeMFA.snoozeDurationInDays",
868868
"label": "Number of days to allow users to skip registering Authenticator (0-14, default is 1)",
869-
"defaultValue": 1
869+
"defaultValue": 1,
870+
"validators": {
871+
"min": { "value": 0, "message": "Minimum value is 0" },
872+
"max": { "value": 14, "message": "Maximum value is 14" }
873+
}
870874
}
871875
],
872876
"label": "Sets the state for the request to setup Authenticator",
@@ -1104,20 +1108,23 @@
11041108
"name": "standards.StaleEntraDevices",
11051109
"cat": "Entra (AAD) Standards",
11061110
"tag": ["Essential 8 (1501)", "NIST CSF 2.0 (ID.AM-08)", "NIST CSF 2.0 (PR.PS-03)"],
1107-
"helpText": "Remediate is currently not available. Cleans up Entra devices that have not connected/signed in for the specified number of days.",
1111+
"helpText": "**Remediate is currently not available**. Cleans up Entra devices that have not connected/signed in for the specified number of days.",
11081112
"docsDescription": "Remediate is currently not available. Cleans up Entra devices that have not connected/signed in for the specified number of days. First disables and later deletes the devices. More info can be found in the [Microsoft documentation](https://learn.microsoft.com/en-us/entra/identity/devices/manage-stale-devices)",
11091113
"executiveText": "Automatically identifies and removes inactive devices that haven't connected to company systems for a specified period, reducing security risks from abandoned or lost devices. This maintains a clean device inventory and prevents potential unauthorized access through dormant device registrations.",
11101114
"addedComponent": [
11111115
{
11121116
"type": "number",
11131117
"name": "standards.StaleEntraDevices.deviceAgeThreshold",
1114-
"label": "Days before stale(Do not set below 30)"
1118+
"label": "Days before stale(Do not set below 30)",
1119+
"validators": {
1120+
"min": { "value": 30, "message": "Minimum value is 30" }
1121+
}
11151122
}
11161123
],
11171124
"disabledFeatures": {
11181125
"report": false,
11191126
"warn": false,
1120-
"remediate": false
1127+
"remediate": true
11211128
},
11221129
"label": "Cleanup stale Entra devices",
11231130
"impact": "High Impact",
@@ -1702,6 +1709,32 @@
17021709
"powershellEquivalent": "Set-OrganizationConfig -AuditDisabled $false",
17031710
"recommendedBy": ["CIS", "CIPP"]
17041711
},
1712+
{
1713+
"name": "standards.AutoArchive",
1714+
"cat": "Exchange Standards",
1715+
"tag": [],
1716+
"helpText": "Configures the auto-archiving threshold percentage for the tenant. When a mailbox exceeds this threshold, the oldest items are automatically moved to the archive mailbox. Archive must be enabled manually or via the CIPP standard 'Enable Online Archive for all users'. More information can be found in [Microsoft's documentation.](https://learn.microsoft.com/en-us/exchange/security-and-compliance/messaging-records-management/auto-archiving)",
1717+
"docsDescription": "Configures the auto-archiving threshold at the organization level. Auto-archiving automatically moves the oldest items from a user's primary mailbox to their archive mailbox when mailbox usage exceeds the configured threshold percentage. This prevents mail flow disruptions caused by full mailboxes. Valid range is 80-100, where 100 disables auto-archiving for the tenant. More information can be found in [Microsoft's documentation.](https://learn.microsoft.com/en-us/exchange/security-and-compliance/messaging-records-management/auto-archiving)",
1718+
"executiveText": "Configures automatic archiving of mailbox items when storage approaches capacity, preventing email delivery failures due to full mailboxes. This proactive storage management ensures business continuity and reduces helpdesk tickets related to mailbox quota issues.",
1719+
"addedComponent": [
1720+
{
1721+
"type": "number",
1722+
"name": "standards.AutoArchive.AutoArchivingThresholdPercentage",
1723+
"label": "Auto-Archiving Threshold Percentage (80-100, default 96, 100 disables)",
1724+
"defaultValue": 96,
1725+
"validators": {
1726+
"min": { "value": 80, "message": "Minimum value is 80" },
1727+
"max": { "value": 100, "message": "Maximum value is 100" }
1728+
}
1729+
}
1730+
],
1731+
"label": "Configure Auto-Archiving Threshold",
1732+
"impact": "Low Impact",
1733+
"impactColour": "info",
1734+
"addedDate": "2025-12-11",
1735+
"powershellEquivalent": "Set-OrganizationConfig -AutoArchivingThresholdPercentage 80-100",
1736+
"recommendedBy": []
1737+
},
17051738
{
17061739
"name": "standards.SendReceiveLimitTenant",
17071740
"cat": "Exchange Standards",
@@ -1713,13 +1746,21 @@
17131746
"type": "number",
17141747
"name": "standards.SendReceiveLimitTenant.SendLimit",
17151748
"label": "Send limit in MB (Default is 35)",
1716-
"defaultValue": 35
1749+
"defaultValue": 35,
1750+
"validators": {
1751+
"min": { "value": 1, "message": "Minimum value is 1" },
1752+
"max": { "value": 150, "message": "Maximum value is 150" }
1753+
}
17171754
},
17181755
{
17191756
"type": "number",
17201757
"name": "standards.SendReceiveLimitTenant.ReceiveLimit",
17211758
"label": "Receive Limit in MB (Default is 36)",
1722-
"defaultValue": 36
1759+
"defaultValue": 36,
1760+
"validators": {
1761+
"min": { "value": 1, "message": "Minimum value is 1" },
1762+
"max": { "value": 150, "message": "Maximum value is 150" }
1763+
}
17231764
}
17241765
],
17251766
"label": "Set send/receive size limits",
@@ -1814,19 +1855,31 @@
18141855
"type": "number",
18151856
"name": "standards.EXOOutboundSpamLimits.RecipientLimitExternalPerHour",
18161857
"label": "External Recipient Limit Per Hour",
1817-
"defaultValue": 400
1858+
"defaultValue": 400,
1859+
"validators": {
1860+
"min": { "value": 0, "message": "Minimum value is 0" },
1861+
"max": { "value": 10000, "message": "Maximum value is 10000" }
1862+
}
18181863
},
18191864
{
18201865
"type": "number",
18211866
"name": "standards.EXOOutboundSpamLimits.RecipientLimitInternalPerHour",
18221867
"label": "Internal Recipient Limit Per Hour",
1823-
"defaultValue": 800
1868+
"defaultValue": 800,
1869+
"validators": {
1870+
"min": { "value": 0, "message": "Minimum value is 0" },
1871+
"max": { "value": 10000, "message": "Maximum value is 10000" }
1872+
}
18241873
},
18251874
{
18261875
"type": "number",
18271876
"name": "standards.EXOOutboundSpamLimits.RecipientLimitPerDay",
18281877
"label": "Daily Recipient Limit",
1829-
"defaultValue": 800
1878+
"defaultValue": 800,
1879+
"validators": {
1880+
"min": { "value": 0, "message": "Minimum value is 0" },
1881+
"max": { "value": 10000, "message": "Maximum value is 10000" }
1882+
}
18301883
},
18311884
{
18321885
"type": "autoComplete",
@@ -1959,13 +2012,21 @@
19592012
"type": "number",
19602013
"name": "standards.ShortenMeetings.DefaultMinutesToReduceShortEventsBy",
19612014
"label": "Minutes to reduce short calendar events by (Default is 5)",
1962-
"defaultValue": 5
2015+
"defaultValue": 5,
2016+
"validators": {
2017+
"min": { "value": 0, "message": "Minimum value is 0" },
2018+
"max": { "value": 29, "message": "Maximum value is 29" }
2019+
}
19632020
},
19642021
{
19652022
"type": "number",
19662023
"name": "standards.ShortenMeetings.DefaultMinutesToReduceLongEventsBy",
19672024
"label": "Minutes to reduce long calendar events by (Default is 10)",
1968-
"defaultValue": 10
2025+
"defaultValue": 10,
2026+
"validators": {
2027+
"min": { "value": 0, "message": "Minimum value is 0" },
2028+
"max": { "value": 29, "message": "Maximum value is 29" }
2029+
}
19692030
}
19702031
],
19712032
"label": "Set shorten meetings state",
@@ -2389,7 +2450,11 @@
23892450
"type": "number",
23902451
"label": "Phishing email threshold. (Default 1)",
23912452
"name": "standards.AntiPhishPolicy.PhishThresholdLevel",
2392-
"defaultValue": 1
2453+
"defaultValue": 1,
2454+
"validators": {
2455+
"min": { "value": 1, "message": "Minimum value is 1" },
2456+
"max": { "value": 4, "message": "Maximum value is 4" }
2457+
}
23932458
},
23942459
{
23952460
"type": "switch",
@@ -2885,7 +2950,11 @@
28852950
"type": "number",
28862951
"label": "Bulk email threshold (Default 7)",
28872952
"name": "standards.SpamFilterPolicy.BulkThreshold",
2888-
"defaultValue": 7
2953+
"defaultValue": 7,
2954+
"validators": {
2955+
"min": { "value": 1, "message": "Minimum value is 1" },
2956+
"max": { "value": 9, "message": "Maximum value is 9" }
2957+
}
28892958
},
28902959
{
28912960
"type": "autoComplete",
@@ -3380,7 +3449,12 @@
33803449
{
33813450
"type": "number",
33823451
"name": "standards.IntuneComplianceSettings.deviceComplianceCheckinThresholdDays",
3383-
"label": "Compliance status validity period (days)"
3452+
"label": "Compliance status validity period (days)",
3453+
"defaultValue": 130,
3454+
"validators": {
3455+
"min": { "value": 1, "message": "Minimum value is 1" },
3456+
"max": { "value": 120, "message": "Maximum value is 120" }
3457+
}
33843458
}
33853459
],
33863460
"label": "Set Intune Compliance Settings",
@@ -3543,13 +3617,21 @@
35433617
"type": "number",
35443618
"name": "standards.EnrollmentWindowsHelloForBusinessConfiguration.pinMinimumLength",
35453619
"label": "Minimum PIN length (4-127)",
3546-
"default": 4
3620+
"default": 4,
3621+
"validators": {
3622+
"min": { "value": 4, "message": "Minimum value is 4" },
3623+
"max": { "value": 127, "message": "Maximum value is 127" }
3624+
}
35473625
},
35483626
{
35493627
"type": "number",
35503628
"name": "standards.EnrollmentWindowsHelloForBusinessConfiguration.pinMaximumLength",
35513629
"label": "Maximum PIN length (4-127)",
3552-
"default": 127
3630+
"default": 127,
3631+
"validators": {
3632+
"min": { "value": 4, "message": "Minimum value is 4" },
3633+
"max": { "value": 127, "message": "Maximum value is 127" }
3634+
}
35533635
},
35543636
{
35553637
"type": "autoComplete",
@@ -3786,7 +3868,11 @@
37863868
"type": "number",
37873869
"name": "standards.SPFileRequests.expirationDays",
37883870
"label": "Link Expiration 1-730 Days (Optional)",
3789-
"required": false
3871+
"required": false,
3872+
"validators": {
3873+
"min": { "value": 1, "message": "Minimum value is 1" },
3874+
"max": { "value": 730, "message": "Maximum value is 730" }
3875+
}
37903876
}
37913877
],
37923878
"label": "Set SharePoint and OneDrive File Requests",
@@ -3882,7 +3968,12 @@
38823968
{
38833969
"type": "number",
38843970
"name": "standards.SPExternalUserExpiration.Days",
3885-
"label": "Days until expiration (Default 60)"
3971+
"label": "Days until expiration (Default 60)",
3972+
"defaultValue": 60,
3973+
"validators": {
3974+
"min": { "value": 1, "message": "Minimum value is 1" },
3975+
"max": { "value": 730, "message": "Maximum value is 730" }
3976+
}
38863977
}
38873978
],
38883979
"label": "Set guest access to expire automatically",
@@ -3902,7 +3993,12 @@
39023993
{
39033994
"type": "number",
39043995
"name": "standards.SPEmailAttestation.Days",
3905-
"label": "Require re-authentication every X Days (Default 15)"
3996+
"label": "Require re-authentication every X Days (Default 15)",
3997+
"defaultValue": 15,
3998+
"validators": {
3999+
"min": { "value": 1, "message": "Minimum value is 1" },
4000+
"max": { "value": 365, "message": "Maximum value is 365" }
4001+
}
39064002
}
39074003
],
39084004
"label": "Require re-authentication with verification code",
@@ -4612,7 +4708,12 @@
46124708
"type": "number",
46134709
"name": "standards.TeamsMeetingRecordingExpiration.ExpirationDays",
46144710
"label": "Recording Expiration Days (e.g., 365)",
4615-
"required": true
4711+
"required": true,
4712+
"defaultValue": 120,
4713+
"validators": {
4714+
"min": { "value": -1, "message": "Minimum value is -1" },
4715+
"max": { "value": 99999, "message": "Maximum value is 99999" }
4716+
}
46164717
}
46174718
],
46184719
"label": "Set Teams Meeting Recording Expiration",
@@ -4725,7 +4826,11 @@
47254826
"type": "number",
47264827
"name": "standards.AutopilotStatusPage.TimeOutInMinutes",
47274828
"label": "Timeout in minutes",
4728-
"defaultValue": 60
4829+
"defaultValue": 60,
4830+
"validators": {
4831+
"min": { "value": 1, "message": "Minimum value is 1" },
4832+
"max": { "value": 1440, "message": "Maximum value is 1440" }
4833+
}
47294834
},
47304835
{
47314836
"type": "textField",
@@ -5192,7 +5297,11 @@
51925297
"type": "number",
51935298
"name": "standards.MailboxRecipientLimits.RecipientLimit",
51945299
"label": "Recipient Limit",
5195-
"defaultValue": 500
5300+
"defaultValue": 500,
5301+
"validators": {
5302+
"min": { "value": 1, "message": "Minimum value is 1" },
5303+
"max": { "value": 1000, "message": "Maximum value is 1000" }
5304+
}
51965305
}
51975306
],
51985307
"label": "Set Mailbox Recipient Limits",

src/pages/tenant/manage/user-defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const Page = () => {
6161
<>
6262
<CippTablePage
6363
title={pageTitle}
64-
apiUrl={`/api/ListNewUserDefaults`}
64+
apiUrl={`/api/ListNewUserDefaults?includeAllTenants=false`}
6565
queryKey={`ListNewUserDefaults-${userSettings.currentTenant}`}
6666
actions={actions}
6767
offCanvas={offCanvas}

0 commit comments

Comments
 (0)