From d1280101645e0c14ac4481b6d69b0ca0d898dd57 Mon Sep 17 00:00:00 2001 From: Esco Date: Mon, 13 Jan 2025 13:03:40 +0100 Subject: [PATCH 01/11] fix: High Confidence Spam single select --- src/data/standards.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/data/standards.json b/src/data/standards.json index 3bce57411d37..13d6a8d6a856 100644 --- a/src/data/standards.json +++ b/src/data/standards.json @@ -1827,6 +1827,7 @@ }, { "type": "autoComplete", + "multiple": false, "label": "High Confidence Spam Action", "name": "standards.SpamFilterPolicy.HighConfidenceSpamAction", "options": [ From f0cac258c9baa5f23fde0ebe034ea6c3fa9c97f0 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar <49186168+KelvinTegelaar@users.noreply.github.com> Date: Mon, 13 Jan 2025 15:14:42 +0100 Subject: [PATCH 02/11] fixing actions --- src/pages/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/index.js b/src/pages/index.js index fe05b42d532d..5007b588a0bf 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -126,7 +126,7 @@ const Page = () => { if (!Array.isArray(actions)) { actions = [actions]; } - + console.log("actions is", actions); actions?.forEach((actionObj) => { if (actionObj?.value === "Remediate") { remediateCount++; From d98fdcc874ab4c0ba80256afa39c5d6a3b056b76 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar <49186168+KelvinTegelaar@users.noreply.github.com> Date: Mon, 13 Jan 2025 16:25:25 +0100 Subject: [PATCH 03/11] fix tenant.some --- src/pages/index.js | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/src/pages/index.js b/src/pages/index.js index 5007b588a0bf..b8ffad358dd8 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -90,21 +90,30 @@ const Page = () => { }, ]; - // Helper to get action counts for the current tenant function getActionCountsForTenant(standardsData, currentTenant) { - if (!standardsData) return { remediateCount: 0, alertCount: 0, reportCount: 0, total: 0 }; + if (!standardsData) { + return { + remediateCount: 0, + alertCount: 0, + reportCount: 0, + total: 0, + }; + } - // Identify which templates apply: const applicableTemplates = standardsData.filter((template) => { + const tenantFilterArr = Array.isArray(template?.tenantFilter) ? template.tenantFilter : []; + const excludedTenantsArr = Array.isArray(template?.excludedTenants) + ? template.excludedTenants + : []; + const tenantInFilter = - template?.tenantFilter?.length > 0 && - template.tenantFilter.some((tf) => tf.value === currentTenant); + tenantFilterArr.length > 0 && tenantFilterArr.some((tf) => tf.value === currentTenant); + const allTenantsTemplate = - template?.tenantFilter?.length > 0 && - template.tenantFilter.some((tf) => tf.value === "AllTenants") && - (!template?.excludedTenants || - (Array.isArray(template?.excludedTenants) && template?.excludedTenants?.length === 0) || - !template?.excludedTenants?.some((et) => et.value === currentTenant)); + tenantFilterArr.some((tf) => tf.value === "AllTenants") && + (excludedTenantsArr.length === 0 || + !excludedTenantsArr.some((et) => et.value === currentTenant)); + return tenantInFilter || allTenantsTemplate; }); @@ -127,7 +136,7 @@ const Page = () => { actions = [actions]; } console.log("actions is", actions); - actions?.forEach((actionObj) => { + actions.forEach((actionObj) => { if (actionObj?.value === "Remediate") { remediateCount++; } else if (actionObj?.value === "Alert") { @@ -139,6 +148,7 @@ const Page = () => { } const total = Object.keys(combinedStandards).length; + return { remediateCount, alertCount, reportCount, total }; } From c93aadd69d9d91940823caa15d53bab92b2c87e3 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar <49186168+KelvinTegelaar@users.noreply.github.com> Date: Mon, 13 Jan 2025 16:38:09 +0100 Subject: [PATCH 04/11] remove duplicate tenantid --- src/pages/cipp/settings/tenants.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/cipp/settings/tenants.js b/src/pages/cipp/settings/tenants.js index 9e0518aa56d6..661c6abff313 100644 --- a/src/pages/cipp/settings/tenants.js +++ b/src/pages/cipp/settings/tenants.js @@ -115,7 +115,7 @@ const Page = () => { confirmText: "This will refresh the tenant and update the tenant details. This can be used to force a tenant to reappear in the list. Run this with no Tenant Filter to refresh all tenants.", type: "GET", - data: { TriggerRefresh: "!true", TenantFilter: "tenantFilter" }, + data: { TriggerRefresh: "!true" }, replacementBehaviour: "removeNulls", }} /> From 1f52a8208708962b06af368d1a54c7084bed8412 Mon Sep 17 00:00:00 2001 From: Brian Simpson <50429915+bmsimp@users.noreply.github.com> Date: Mon, 13 Jan 2025 12:09:04 -0600 Subject: [PATCH 05/11] Update config.js to fix Sharepoint to SharePoint --- src/layouts/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/config.js b/src/layouts/config.js index 5317a567bc47..04ac4b62e3dc 100644 --- a/src/layouts/config.js +++ b/src/layouts/config.js @@ -263,7 +263,7 @@ export const nativeMenuItems = [ ], }, { - title: "Teams & Sharepoint", + title: "Teams & SharePoint", type: "header", icon: ( From 00aee490a29db202aca8e43fb10681421f19e562 Mon Sep 17 00:00:00 2001 From: Esco Date: Mon, 13 Jan 2025 22:37:35 +0100 Subject: [PATCH 06/11] feat: CippDevInstallation --- Tools/Start-CippDevEmulatorsWithKitty.ps1 | 9 ++++--- Tools/Start-CippDevInstallation.ps1 | 32 +++++++++++++++++++++++ 2 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 Tools/Start-CippDevInstallation.ps1 diff --git a/Tools/Start-CippDevEmulatorsWithKitty.ps1 b/Tools/Start-CippDevEmulatorsWithKitty.ps1 index d0f156fd6479..39666bdcb05c 100644 --- a/Tools/Start-CippDevEmulatorsWithKitty.ps1 +++ b/Tools/Start-CippDevEmulatorsWithKitty.ps1 @@ -1,8 +1,11 @@ Get-Command kitty -ErrorAction Stop | Out-Null -Write-Host 'Starting CIPP Dev Emulators' Get-Process node -ErrorAction SilentlyContinue | Stop-Process -ErrorAction SilentlyContinue $Path = (Get-Item $PSScriptRoot).Parent.Parent.FullName +pwsh -file (Join-Path $PSScriptRoot 'Start-CippDevInstallation.ps1') + +Write-Host 'Starting CIPP Dev Emulators' + if (Test-Path (Join-Path $Path 'CIPP-API-Processor')) { $Process = Read-Host -Prompt 'Start Process Function (y/N)?' } @@ -11,7 +14,7 @@ if ($Process -eq 'y') { kitty --detach --title 'CIPP' -o allow_remote_control=yes -- pwsh -c " kitty @new-window --new-tab --tab-title `"Azurite`" --cwd $Path -- azurite ; kitty @new-window --new-tab --tab-title `"FunctionApp`" --cwd (Join-Path $Path `"CIPP-API`") -- func start; - kitty @new-window --new-tab --tab-title `"CIPP Frontend`" --cwd (Join-Path $Path `"CIPP`") -- npm run dev ; + kitty @new-window --new-tab --tab-title `"CIPP Frontend`" --cwd (Join-Path $Path `"CIPP`") -- yarn run dev ; kitty @new-window --new-tab --tab-title `"SWA`" --cwd (Join-Path $Path `"CIPP`") -- npm run start-swa; kitty @new-window --new-tab --tab-title `"CIPP-API-Processor`" --cwd (Join-Path $Path `"CIPP-API-Processor`") -- func start --port 7072" @@ -19,6 +22,6 @@ if ($Process -eq 'y') { kitty --detach --title 'CIPP' -o allow_remote_control=yes -- pwsh -c " kitty @new-window --new-tab --tab-title `"Azurite`" --cwd $Path -- azurite ; kitty @new-window --new-tab --tab-title `"FunctionApp`" --cwd (Join-Path $Path `"CIPP-API`") -- func start; - kitty @new-window --new-tab --tab-title `"CIPP Frontend`" --cwd (Join-Path $Path `"CIPP`") -- npm run dev ; + kitty @new-window --new-tab --tab-title `"CIPP Frontend`" --cwd (Join-Path $Path `"CIPP`") -- yarn run dev ; kitty @new-window --new-tab --tab-title `"SWA`" --cwd (Join-Path $Path `"CIPP`") -- npm run start-swa" } diff --git a/Tools/Start-CippDevInstallation.ps1 b/Tools/Start-CippDevInstallation.ps1 new file mode 100644 index 000000000000..fa1de465b2eb --- /dev/null +++ b/Tools/Start-CippDevInstallation.ps1 @@ -0,0 +1,32 @@ +$Path = (Get-Item $PSScriptRoot).Parent.Parent.FullName + +if (-not(Get-Command npm)) { + throw 'npm is required to install the CIPP development environment' +} + +if (-not(Get-Command azurite)) { + Write-Host 'Installing Azurite' + npm install --global 'azurite' +} + +if (-not(Get-Command swa)) { + Write-Host 'Installing @azure/static-web-apps-cli' + npm install --global '@azure/static-web-apps-cli' +} + +if (-not(Get-Command func)) { + Write-Host 'Installing Azure Functions Core Tools' + npm install --global 'azure-functions-core-tools@4' --unsafe-perms true +} + +if (-not(Get-Command yarn)) { + Write-Host 'Installing Yarn' + npm install --global yarn +} + +if (-not(yarn list --global --pattern 'next' | Select-String -Pattern 'next')) { + Write-Host 'Installing Next.js' + yarn install --global next --network-timeout 500000 +} + +yarn install --cwd (Join-Path $Path "CIPP") --network-timeout 500000 From 8067ae627bcc7a5319d8f65ea590933b5b37e990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20Kj=C3=A6rg=C3=A5rd?= Date: Tue, 14 Jan 2025 12:25:32 +0100 Subject: [PATCH 07/11] Update CippExchangeSettingsForm to include default option in user selection --- .../CippFormPages/CippExchangeSettingsForm.jsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/CippFormPages/CippExchangeSettingsForm.jsx b/src/components/CippFormPages/CippExchangeSettingsForm.jsx index f528e4a45e94..e46b0ab157f6 100644 --- a/src/components/CippFormPages/CippExchangeSettingsForm.jsx +++ b/src/components/CippFormPages/CippExchangeSettingsForm.jsx @@ -244,12 +244,13 @@ const CippExchangeSettingsForm = (props) => { label="Add Access" name="calendar.UserToGetPermissions" isFetching={isFetching || usersList.isFetching} - options={ - usersList?.data?.Results?.map((user) => ({ + options={[ + { value: "Default", label: "Default (Default)" }, + ...(usersList?.data?.Results?.map((user) => ({ value: user.userPrincipalName, label: `${user.displayName} (${user.userPrincipalName})`, - })) || [] - } + })) || []), + ]} multiple={false} formControl={formControl} /> From 5ca85e8b5030822d8102e70940fa32359ee93539 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20Kj=C3=A6rg=C3=A5rd?= Date: Tue, 14 Jan 2025 14:31:14 +0100 Subject: [PATCH 08/11] Update Compliance Portal links to point to Purview --- src/components/CippComponents/CippTenantSelector.jsx | 2 +- src/data/portals.json | 2 +- src/pages/tenant/administration/tenants/index.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/CippComponents/CippTenantSelector.jsx b/src/components/CippComponents/CippTenantSelector.jsx index b7299ceee8df..aad7d30889fd 100644 --- a/src/components/CippComponents/CippTenantSelector.jsx +++ b/src/components/CippComponents/CippTenantSelector.jsx @@ -228,7 +228,7 @@ export const CippTenantSelector = (props) => { }, { label: "Compliance Portal", - link: `https://compliance.microsoft.com/?tid=${currentTenant?.addedFields?.customerId}`, + link: `https://purview.microsoft.com/?tid=${currentTenant?.addedFields?.customerId}`, icon: , }, ]} diff --git a/src/data/portals.json b/src/data/portals.json index bef73cee6a5f..ce1ac67be8e8 100644 --- a/src/data/portals.json +++ b/src/data/portals.json @@ -65,7 +65,7 @@ { "label": "Compliance Portal", "name": "Compliance_Portal", - "url": "https://compliance.microsoft.com/?tid=customerId", + "url": "https://purview.microsoft.com/?tid=customerId", "variable": "customerId", "target": "_blank", "external": true, diff --git a/src/pages/tenant/administration/tenants/index.js b/src/pages/tenant/administration/tenants/index.js index 1ce9bfaff69b..1fba7f387944 100644 --- a/src/pages/tenant/administration/tenants/index.js +++ b/src/pages/tenant/administration/tenants/index.js @@ -22,7 +22,7 @@ const Page = () => { portal_azure: `https://portal.azure.com/${tenant.defaultDomainName}`, portal_intune: `https://intune.microsoft.com/${tenant.defaultDomainName}`, portal_security: `https://security.microsoft.com/?tid=${tenant.customerId}`, - portal_compliance: `https://compliance.microsoft.com/?tid=${tenant.customerId}`, + portal_compliance: `https://purview.microsoft.com/?tid=${tenant.customerId}`, portal_sharepoint: `https://admin.microsoft.com/Partner/beginclientsession.aspx?CTID=${tenant.customerId}&CSDEST=SharePoint`, }); }); From 519bf9e4f6513503da2d664a8346e5071c31ccfc Mon Sep 17 00:00:00 2001 From: Esco Date: Tue, 14 Jan 2025 15:05:43 +0100 Subject: [PATCH 09/11] fix: repair Quarantine Management --- src/pages/email/administration/quarantine/index.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/pages/email/administration/quarantine/index.js b/src/pages/email/administration/quarantine/index.js index 5f62c31c6e07..d9d0bbf63087 100644 --- a/src/pages/email/administration/quarantine/index.js +++ b/src/pages/email/administration/quarantine/index.js @@ -96,8 +96,7 @@ const Page = () => { type: "POST", url: "/api/ExecQuarantineManagement", data: { - TenantFilter: "TenantFilter", - ID: "id", + Identity: "Identity", Type: "Release", }, confirmText: "Are you sure you want to release this message?", @@ -108,8 +107,7 @@ const Page = () => { type: "POST", url: "/api/ExecQuarantineManagement", data: { - TenantFilter: "TenantFilter", - ID: "id", + Identity: "Identity", Type: "Deny", }, confirmText: "Are you sure you want to deny this message?", @@ -120,8 +118,7 @@ const Page = () => { type: "POST", url: "/api/ExecQuarantineManagement", data: { - TenantFilter: "TenantFilter", - ID: "id", + Identity: "Identity", Type: "Release", AllowSender: true, }, From 14b35c1aaf419fac13180a62b931c95280562d05 Mon Sep 17 00:00:00 2001 From: Esco Date: Tue, 14 Jan 2025 19:03:56 +0100 Subject: [PATCH 10/11] fix: missing imports for View Message Trace --- src/pages/email/administration/quarantine/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/email/administration/quarantine/index.js b/src/pages/email/administration/quarantine/index.js index d9d0bbf63087..eb24a4f73ccb 100644 --- a/src/pages/email/administration/quarantine/index.js +++ b/src/pages/email/administration/quarantine/index.js @@ -1,7 +1,7 @@ import { Layout as DashboardLayout } from "/src/layouts/index.js"; import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx"; import { useEffect, useState } from "react"; -import { Dialog, DialogTitle, DialogContent, IconButton, Skeleton } from "@mui/material"; +import { Dialog, DialogTitle, DialogContent, IconButton, Skeleton, Typography, CircularProgress } from "@mui/material"; import { Block, Close, Done, DoneAll, Subject } from "@mui/icons-material"; import { CippMessageViewer } from "/src/components/CippComponents/CippMessageViewer.jsx"; import { ApiGetCall, ApiPostCall } from "/src/api/ApiCall"; From c84ac31fc4c36521e76559e9e6064e1b5867eec7 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar <49186168+KelvinTegelaar@users.noreply.github.com> Date: Tue, 14 Jan 2025 19:15:52 +0100 Subject: [PATCH 11/11] upped versions --- public/version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/version.json b/public/version.json index e7af43a4ee4c..afe1c8c5194e 100644 --- a/public/version.json +++ b/public/version.json @@ -1,3 +1,3 @@ { - "version": "7.0.2" + "version": "7.0.3" }