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 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" } 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/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} /> 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/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": [ 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: ( 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", }} /> diff --git a/src/pages/email/administration/quarantine/index.js b/src/pages/email/administration/quarantine/index.js index 5f62c31c6e07..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"; @@ -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, }, diff --git a/src/pages/index.js b/src/pages/index.js index fe05b42d532d..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; }); @@ -126,8 +135,8 @@ const Page = () => { if (!Array.isArray(actions)) { actions = [actions]; } - - actions?.forEach((actionObj) => { + console.log("actions is", actions); + 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 }; } 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`, }); });