From d0a3ac952f1d680dfc6916bacdd9780696ed5e65 Mon Sep 17 00:00:00 2001 From: BNWEIN Date: Mon, 9 Oct 2023 13:08:43 +0100 Subject: [PATCH 01/40] Create azure-static-web-apps-proud-smoke-0849e8603.yml --- ...-static-web-apps-proud-smoke-0849e8603.yml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/azure-static-web-apps-proud-smoke-0849e8603.yml diff --git a/.github/workflows/azure-static-web-apps-proud-smoke-0849e8603.yml b/.github/workflows/azure-static-web-apps-proud-smoke-0849e8603.yml new file mode 100644 index 000000000000..dbcc4eb90308 --- /dev/null +++ b/.github/workflows/azure-static-web-apps-proud-smoke-0849e8603.yml @@ -0,0 +1,46 @@ +name: Azure Static Web Apps CI/CD + +on: + push: + branches: + - dev + pull_request: + types: [opened, synchronize, reopened, closed] + branches: + - dev + +jobs: + build_and_deploy_job: + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') + runs-on: ubuntu-latest + name: Build and Deploy Job + steps: + - uses: actions/checkout@v3 + with: + submodules: true + lfs: false + - name: Build And Deploy + id: builddeploy + uses: Azure/static-web-apps-deploy@v1 + with: + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PROUD_SMOKE_0849E8603 }} + repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) + action: "upload" + ###### Repository/Build Configurations - These values can be configured to match your app requirements. ###### + # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig + app_location: "/" # App source code path + api_location: "" # Api source code path - optional + output_location: "" # Built app content directory - optional + ###### End of Repository/Build Configurations ###### + + close_pull_request_job: + if: github.event_name == 'pull_request' && github.event.action == 'closed' + runs-on: ubuntu-latest + name: Close Pull Request Job + steps: + - name: Close Pull Request + id: closepullrequest + uses: Azure/static-web-apps-deploy@v1 + with: + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PROUD_SMOKE_0849E8603 }} + action: "close" From 4f6b4eb9879537f7d9f1907024c190903bd6524b Mon Sep 17 00:00:00 2001 From: Jr7468 Date: Fri, 13 Oct 2023 13:27:47 +0100 Subject: [PATCH 02/40] Add Advanced Out of Office Tool --- .../administration/EditMailboxPermissions.js | 243 +++++++++++++++++- src/views/identity/administration/Users.js | 3 +- 2 files changed, 244 insertions(+), 2 deletions(-) diff --git a/src/views/email-exchange/administration/EditMailboxPermissions.js b/src/views/email-exchange/administration/EditMailboxPermissions.js index b0649954994b..20b0ec147405 100644 --- a/src/views/email-exchange/administration/EditMailboxPermissions.js +++ b/src/views/email-exchange/administration/EditMailboxPermissions.js @@ -21,7 +21,11 @@ import { Form, Field } from 'react-final-form' import { RFFSelectSearch, RFFCFormSelect, RFFCFormCheck, RFFCFormInput } from 'src/components/forms' import { useListUsersQuery } from 'src/store/api/users' import { ModalService } from 'src/components/utilities' -import { useLazyGenericPostRequestQuery, useLazyGenericGetRequestQuery } from 'src/store/api/app' +import { + useLazyGenericPostRequestQuery, + useLazyGenericGetRequestQuery, + useGenericGetRequestQuery, +} from 'src/store/api/app' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faCircleNotch } from '@fortawesome/free-solid-svg-icons' import { @@ -32,6 +36,9 @@ import { import { CippTable } from 'src/components/tables' import { useListMailboxDetailsQuery } from 'src/store/api/mailbox' import { CellBoolean } from 'src/components/tables' +import DatePicker from 'react-datepicker' +import 'react-datepicker/dist/react-datepicker.css' +import { RFFCFormSwitch } from 'src/components/forms' const formatter = (cell, warning = false, reverse = false, colourless = false) => CellBoolean({ cell, warning, reverse, colourless }) @@ -114,6 +121,9 @@ const MailboxSettings = () => { setActive(3)} href="#"> Mailbox Forwarding + setActive(4)} href="#"> + Out Of Office + @@ -127,6 +137,9 @@ const MailboxSettings = () => { + + + @@ -158,6 +171,11 @@ const MailboxSettings = () => { )} + {active === 4 && ( + <> + + + )} @@ -761,3 +779,226 @@ const ForwardingSettings = () => { ) } + +const OutOfOffice = () => { + const dispatch = useDispatch() + let query = useQuery() + const userId = query.get('userId') + const tenantDomain = query.get('tenantDomain') + const [queryError, setQueryError] = useState(false) + const [genericPostRequest, postResults] = useLazyGenericPostRequestQuery() + const [startDate, setStartDate] = useState(new Date()) + const [endDate, setEndDate] = useState(new Date()) + const { + data: user = {}, + isFetching: userIsFetching, + error: userError, + } = useListMailboxPermissionsQuery({ tenantDomain, userId }) + + const { + data: users = [], + isFetching: usersIsFetching, + error: usersError, + } = useListUsersQuery({ tenantDomain }) + + useEffect(() => { + if (postResults.isSuccess) { + } + if (!userId || !tenantDomain) { + ModalService.open({ + body: 'Error invalid request, could not load requested user.', + title: 'Invalid Request', + }) + setQueryError(true) + } else { + setQueryError(false) + } + }, [userId, tenantDomain, dispatch, postResults]) + const onSubmit = (values) => { + const shippedValues = { + user: userId, + tenantFilter: tenantDomain, + AutoReplyState: values.AutoReplyState ? 'Scheduled' : 'Disabled', + StartTime: startDate.toLocaleString(), + EndTime: endDate.toLocaleString(), + InternalMessage: values.InternalMessage ? values.InternalMessage : '', + ExternalMessage: values.ExternalMessage ? values.ExternalMessage : '', + } + //window.alert(JSON.stringify(shippedValues)) + genericPostRequest({ path: '/api/ExecSetOoO', values: shippedValues }) + } + const initialState = { + ...user, + } + + const formDisabled = queryError === true + + return ( + <> + {!queryError && ( + <> + {queryError && ( + + + + {/* @todo add more descriptive help message here */} + Failed to load user + + + + )} + + + {usersIsFetching && } + {userError && Error loading user} + {!usersIsFetching && ( +
{ + return ( + + + + + + + + + + setStartDate(date)} + showTimeSelect + /> + + + + + + setEndDate(date)} + showTimeSelect + /> + + + + + + + + + + + + + + + + Edit Out of Office + {postResults.isFetching && ( + + )} + + + + {postResults.isSuccess && ( + + {postResults.data.Results.map((result, idx) => ( +
  • {result}
  • + ))} +
    + )} +
    + ) + }} + /> + )} + + + + )} + + ) +} + +const OutOfOfficeSettings = () => { + const query = useQuery() + const userId = query.get('userId') + const tenantDomain = query.get('tenantDomain') + const tenantFilter = tenantDomain + const { + data: details, + isFetching, + error, + } = useGenericGetRequestQuery({ + path: '/api/ListOoO', + params: { userId, tenantFilter }, + }) + const content = [ + { + heading: 'Auto Reply State', + body: formatter(details?.AutoReplyState, false, false, true), + }, + { + heading: 'Start Date/Time', + body: details?.StartTime ? details?.StartTime : 'N/A', + }, + { + heading: 'End Date/Time', + body: details?.EndTime ? details?.EndTime : 'N/A', + }, + { + heading: 'Internal Message', + body: details?.InternalMessage ? details?.InternalMessage : 'N/A', + }, + { + heading: 'External Message', + body: details?.ExternalMessage ? details?.ExternalMessage : 'N/A', + }, + ] + return ( + + {isFetching && ( + + Loading + + )} + {!isFetching && ( + + {content.map((item, index) => ( +
    +
    {item.heading}
    +

    {item.body}

    +
    + ))} +
    + )} + {error && Could not connect to API: {error.message}} +
    + ) +} diff --git a/src/views/identity/administration/Users.js b/src/views/identity/administration/Users.js index 69796c07b423..40bf15590a8e 100644 --- a/src/views/identity/administration/Users.js +++ b/src/views/identity/administration/Users.js @@ -149,6 +149,7 @@ const Offcanvas = (row, rowIndex, formatExtraData) => { user: row.userPrincipalName, TenantFilter: tenant.defaultDomainName, message: row.message, + AutoReplyState: 'Enabled', }, modalUrl: `/api/ExecSetOoO`, modalInput: true, @@ -163,7 +164,7 @@ const Offcanvas = (row, rowIndex, formatExtraData) => { modalBody: { user: row.userPrincipalName, TenantFilter: tenant.defaultDomainName, - Disable: true, + AutoReplyState: 'Disabled', }, modalUrl: `/api/ExecSetOoO`, modalMessage: 'Are you sure you want to disable the out of office?', From 749b17b9f020dd1912e0540ff6c20c4715bbac9a Mon Sep 17 00:00:00 2001 From: BNWEIN Date: Sun, 15 Oct 2023 08:09:54 +0100 Subject: [PATCH 03/40] Delete .github/workflows/azure-static-web-apps-proud-smoke-0849e8603.yml --- ...-static-web-apps-proud-smoke-0849e8603.yml | 46 ------------------- 1 file changed, 46 deletions(-) delete mode 100644 .github/workflows/azure-static-web-apps-proud-smoke-0849e8603.yml diff --git a/.github/workflows/azure-static-web-apps-proud-smoke-0849e8603.yml b/.github/workflows/azure-static-web-apps-proud-smoke-0849e8603.yml deleted file mode 100644 index dbcc4eb90308..000000000000 --- a/.github/workflows/azure-static-web-apps-proud-smoke-0849e8603.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Azure Static Web Apps CI/CD - -on: - push: - branches: - - dev - pull_request: - types: [opened, synchronize, reopened, closed] - branches: - - dev - -jobs: - build_and_deploy_job: - if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') - runs-on: ubuntu-latest - name: Build and Deploy Job - steps: - - uses: actions/checkout@v3 - with: - submodules: true - lfs: false - - name: Build And Deploy - id: builddeploy - uses: Azure/static-web-apps-deploy@v1 - with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PROUD_SMOKE_0849E8603 }} - repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) - action: "upload" - ###### Repository/Build Configurations - These values can be configured to match your app requirements. ###### - # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig - app_location: "/" # App source code path - api_location: "" # Api source code path - optional - output_location: "" # Built app content directory - optional - ###### End of Repository/Build Configurations ###### - - close_pull_request_job: - if: github.event_name == 'pull_request' && github.event.action == 'closed' - runs-on: ubuntu-latest - name: Close Pull Request Job - steps: - - name: Close Pull Request - id: closepullrequest - uses: Azure/static-web-apps-deploy@v1 - with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PROUD_SMOKE_0849E8603 }} - action: "close" From 2fc7853bc2276c6a715676a0c4e944b9a1f6ced8 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Mon, 16 Oct 2023 10:13:20 +0200 Subject: [PATCH 04/40] fixes sort --- src/components/tables/CippTable.js | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/src/components/tables/CippTable.js b/src/components/tables/CippTable.js index 5fcb006c88be..72b3247f2218 100644 --- a/src/components/tables/CippTable.js +++ b/src/components/tables/CippTable.js @@ -79,27 +79,23 @@ FilterComponent.propTypes = { filterlist: PropTypes.arrayOf(PropTypes.object), onFilterPreset: PropTypes.func, } +const compareValues = (a, b) => { + if (a === null) return 1 + if (b === null) return -1 + if (typeof a === 'number' && typeof b === 'number') return a - b + if (typeof a === 'boolean' && typeof b === 'boolean') return a === b ? 0 : a ? -1 : 1 + return String(a).localeCompare(String(b), 'en', { numeric: true }) +} const customSort = (rows, selector, direction) => { return rows.sort((a, b) => { - // use the selector to resolve your field names by passing the sort comparitors - let aField - let bField - - aField = selector(a) - bField = selector(b) - - let comparison = 0 - - if (aField?.toString().localeCompare(bField, 'en', { numeric: true }) > 0) { - comparison = 1 - } else if (aField?.toString().localeCompare(bField, 'en', { numeric: true }) < 0) { - comparison = -1 - } - + let aField = selector(a) + let bField = selector(b) + let comparison = compareValues(aField, bField) return direction === 'desc' ? comparison * -1 : comparison }) } + export default function CippTable({ data, isFetching = false, From 7f4c8dffb91ca400c70ced232a5192e8daa35945 Mon Sep 17 00:00:00 2001 From: Jr7468 Date: Tue, 17 Oct 2023 17:41:28 +0100 Subject: [PATCH 05/40] Fixed spacing --- .../email-exchange/administration/EditMailboxPermissions.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/email-exchange/administration/EditMailboxPermissions.js b/src/views/email-exchange/administration/EditMailboxPermissions.js index 20b0ec147405..87525d9d6cc8 100644 --- a/src/views/email-exchange/administration/EditMailboxPermissions.js +++ b/src/views/email-exchange/administration/EditMailboxPermissions.js @@ -859,7 +859,7 @@ const OutOfOffice = () => { return ( - + @@ -888,7 +888,7 @@ const OutOfOffice = () => { - + { - + Date: Wed, 18 Oct 2023 09:47:30 +0100 Subject: [PATCH 06/40] Used regex to eliminate HTML elements in output --- .../email-exchange/administration/EditMailboxPermissions.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/email-exchange/administration/EditMailboxPermissions.js b/src/views/email-exchange/administration/EditMailboxPermissions.js index 87525d9d6cc8..fd41f5af70e1 100644 --- a/src/views/email-exchange/administration/EditMailboxPermissions.js +++ b/src/views/email-exchange/administration/EditMailboxPermissions.js @@ -959,6 +959,7 @@ const OutOfOfficeSettings = () => { path: '/api/ListOoO', params: { userId, tenantFilter }, }) + const combinedRegex = /(<([^>]+)>)|| /gi const content = [ { heading: 'Auto Reply State', @@ -974,11 +975,11 @@ const OutOfOfficeSettings = () => { }, { heading: 'Internal Message', - body: details?.InternalMessage ? details?.InternalMessage : 'N/A', + body: details?.InternalMessage ? details?.InternalMessage.replace(combinedRegex, '') : 'N/A', }, { heading: 'External Message', - body: details?.ExternalMessage ? details?.ExternalMessage : 'N/A', + body: details?.ExternalMessage ? details?.ExternalMessage.replace(combinedRegex, '') : 'N/A', }, ] return ( From 807b90dc1a3b686fee986c99fb78b4364897b48a Mon Sep 17 00:00:00 2001 From: John Duprey Date: Wed, 18 Oct 2023 20:12:19 -0400 Subject: [PATCH 07/40] Permission Checks - Add TableModalButton component - Update permission check to include GDAP info and Role/Group memberships --- src/components/buttons/TableModalButton.js | 40 ++++++++++++++++++++++ src/components/buttons/index.js | 3 +- src/views/cipp/CIPPSettings.js | 38 +++++++++++++++++++- 3 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 src/components/buttons/TableModalButton.js diff --git a/src/components/buttons/TableModalButton.js b/src/components/buttons/TableModalButton.js new file mode 100644 index 000000000000..725405e7629e --- /dev/null +++ b/src/components/buttons/TableModalButton.js @@ -0,0 +1,40 @@ +import React from 'react' +import { CButton } from '@coreui/react' +import { ModalService } from '../utilities' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faCheckCircle } from '@fortawesome/free-solid-svg-icons' +import { cellGenericFormatter } from '../tables/CellGenericFormat' + +export default function TableModalButton({ data, title, className }) { + const handleTable = (data) => { + const QueryColumns = [] + const columns = Object.keys(data[0]).map((key) => { + QueryColumns.push({ + name: key, + selector: (row) => row[key], // Accessing the property using the key + sortable: true, + exportSelector: key, + cell: cellGenericFormatter(), + }) + }) + ModalService.open({ + data: data, + componentType: 'table', + componentProps: { + columns: QueryColumns, + keyField: 'id', + }, + title: title, + size: 'lg', + }) + } + const buttonClass = 'btn ' + className + + return ( + handleTable(data)}> + <> + {title} ({data.length}) + + + ) +} diff --git a/src/components/buttons/index.js b/src/components/buttons/index.js index e0c639073418..c87617eb1456 100644 --- a/src/components/buttons/index.js +++ b/src/components/buttons/index.js @@ -1,5 +1,6 @@ import ExportCsvButton from 'src/components/buttons/CsvButton' import ExportPDFButton from 'src/components/buttons/PdfButton' import TitleButton from 'src/components/buttons/TitleButton' +import TableModalButton from 'src/components/buttons/TableModalButton' -export { ExportCsvButton, ExportPDFButton, TitleButton } +export { ExportCsvButton, ExportPDFButton, TitleButton, TableModalButton } diff --git a/src/views/cipp/CIPPSettings.js b/src/views/cipp/CIPPSettings.js index 1716df3abee3..3fb453caa594 100644 --- a/src/views/cipp/CIPPSettings.js +++ b/src/views/cipp/CIPPSettings.js @@ -82,6 +82,7 @@ import Skeleton from 'react-loading-skeleton' import { Buffer } from 'buffer' import Extensions from 'src/data/Extensions.json' import { CellDelegatedPrivilege } from 'src/components/tables/CellDelegatedPrivilege' +import { TableModalButton } from 'src/components/buttons' const CIPPSettings = () => { const [active, setActive] = useState(1) @@ -387,10 +388,28 @@ const GeneralSettings = () => { )} + {permissionsResult.data.Results?.MissingGroups.length > 0 && ( + <> + Your SAM User is missing the following group memberships. + + {permissionsResult.data.Results?.MissingGroups?.map((r, index) => ( + {r} + ))} + + + )} + {permissionsResult.data.Results?.CIPPGroupCount == 0 && ( + <> + NOTE: M365 GDAP groups were not set up by CIPP, review the SAM user groups + below. + + )} {permissionsResult.data.Results?.AccessTokenDetails?.Name !== '' && ( <> - setTokenOffcanvasVisible(true)}>Details + setTokenOffcanvasVisible(true)}> + Details + { /> )} + {permissionsResult.data.Results?.Memberships !== '' && ( + <> + p['@odata.type'] == '#microsoft.graph.group', + )} + title="Groups" + /> + p['@odata.type'] == '#microsoft.graph.directoryRole', + )} + title="Roles" + /> + + )} )} From 06db64e01740281fea86af75313635a7200ddb56 Mon Sep 17 00:00:00 2001 From: John Duprey Date: Wed, 18 Oct 2023 20:22:25 -0400 Subject: [PATCH 08/40] spacing --- src/views/cipp/CIPPSettings.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/cipp/CIPPSettings.js b/src/views/cipp/CIPPSettings.js index 3fb453caa594..9c75630f2c65 100644 --- a/src/views/cipp/CIPPSettings.js +++ b/src/views/cipp/CIPPSettings.js @@ -407,7 +407,7 @@ const GeneralSettings = () => { {permissionsResult.data.Results?.AccessTokenDetails?.Name !== '' && ( <> - setTokenOffcanvasVisible(true)}> + setTokenOffcanvasVisible(true)}> Details { {permissionsResult.data.Results?.Memberships !== '' && ( <> p['@odata.type'] == '#microsoft.graph.group', )} From 7b36891435703744525efb68e0c0e65f26a80545 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Thu, 19 Oct 2023 18:09:44 +0200 Subject: [PATCH 09/40] changed text a little. --- src/views/cipp/CIPPSettings.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/cipp/CIPPSettings.js b/src/views/cipp/CIPPSettings.js index 9c75630f2c65..b46e9165e005 100644 --- a/src/views/cipp/CIPPSettings.js +++ b/src/views/cipp/CIPPSettings.js @@ -400,8 +400,9 @@ const GeneralSettings = () => { )} {permissionsResult.data.Results?.CIPPGroupCount == 0 && ( <> - NOTE: M365 GDAP groups were not set up by CIPP, review the SAM user groups - below. + NOTE: Your M365 GDAP groups were not set up by CIPP. Please check the groups + below to see if you have the correct GDAP permissions, or execute an access + check. )} From 09a4052fda311920389178b0ac085f33f5d2e331 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Thu, 19 Oct 2023 21:45:38 +0200 Subject: [PATCH 10/40] changed nav --- src/_nav.js | 90 ++++++++++++++++++++++++++++------------------------- 1 file changed, 47 insertions(+), 43 deletions(-) diff --git a/src/_nav.js b/src/_nav.js index 683cd830fdaa..4933192c1a26 100644 --- a/src/_nav.js +++ b/src/_nav.js @@ -246,6 +246,51 @@ const _nav = [ }, ], }, + { + component: CNavGroup, + name: 'GDAP Management', + section: 'Settings', + to: '/cipp/gdap', + icon: , + items: [ + { + component: CNavItem, + name: 'Role Wizard', + to: '/tenant/administration/gdap-role-wizard', + }, + { + component: CNavItem, + name: 'GDAP Roles', + to: '/tenant/administration/gdap-roles', + }, + /*{ + component: CNavItem, + name: 'Migration Wizard', + to: '/tenant/administration/gdap', + }, + { + component: CNavItem, + name: 'GDAP Migration Status', + to: '/tenant/administration/gdap-status', + },*/ + { + component: CNavItem, + name: 'Invite Wizard', + to: '/tenant/administration/gdap-invite', + }, + { + component: CNavItem, + name: 'GDAP Relationships', + to: '/tenant/administration/gdap-relationships', + }, + { + component: CNavItem, + name: 'Documentation', + href: 'https://cipp.app/docs/user/usingcipp/GDAP/migration', + target: '_blank', + }, + ], + }, { component: CNavGroup, name: 'Reports', @@ -678,56 +723,15 @@ const _nav = [ name: 'Logbook', to: '/cipp/logs', }, - { component: CNavItem, name: 'SAM Setup Wizard', to: '/cipp/setup', }, - ], - }, - { - component: CNavGroup, - name: 'GDAP Migration', - section: 'Settings', - to: '/cipp/gdap', - icon: , - items: [ - { - component: CNavItem, - name: 'Role Wizard', - to: '/tenant/administration/gdap-role-wizard', - }, - { - component: CNavItem, - name: 'GDAP Roles', - to: '/tenant/administration/gdap-roles', - }, - { - component: CNavItem, - name: 'Migration Wizard', - to: '/tenant/administration/gdap', - }, { component: CNavItem, - name: 'GDAP Migration Status', - to: '/tenant/administration/gdap-status', - }, - { - component: CNavItem, - name: 'Invite Wizard', - to: '/tenant/administration/gdap-invite', - }, - { - component: CNavItem, - name: 'GDAP Relationships', - to: '/tenant/administration/gdap-relationships', - }, - { - component: CNavItem, - name: 'Documentation', - href: 'https://cipp.app/docs/user/usingcipp/GDAP/migration', - target: '_blank', + name: 'Log Out', + to: '/logout', }, ], }, From a8f7ddc3d70229c8e52939e9b57bfa8fd303cd62 Mon Sep 17 00:00:00 2001 From: BNWEIN Date: Fri, 20 Oct 2023 08:35:18 +0100 Subject: [PATCH 11/40] Fixed Link on Transport Rules Page Finally fixed the link on the transport rules page to deploy a new rule. --- src/views/email-exchange/transport/TransportRules.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/email-exchange/transport/TransportRules.js b/src/views/email-exchange/transport/TransportRules.js index ecb39e6d9af6..77f26875c406 100644 --- a/src/views/email-exchange/transport/TransportRules.js +++ b/src/views/email-exchange/transport/TransportRules.js @@ -122,7 +122,7 @@ const TransportRulesList = () => { tenantSelector={true} titleButton={ <> - + } datatable={{ From 8dcfb905766617a281cc098188be0af2c266fff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20Kj=C3=A6rg=C3=A5rd?= Date: Fri, 20 Oct 2023 18:03:55 +0200 Subject: [PATCH 12/40] Add an Edit Mailbox Permissions button when viewing a user --- src/views/identity/administration/UserActions.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/views/identity/administration/UserActions.js b/src/views/identity/administration/UserActions.js index 78ca9e360fe8..2a96415e0b15 100644 --- a/src/views/identity/administration/UserActions.js +++ b/src/views/identity/administration/UserActions.js @@ -9,6 +9,7 @@ import { faUserTimes, faEllipsisH, faEnvelope, + faEdit, } from '@fortawesome/free-solid-svg-icons' import { ActionContentCard } from 'src/components/contentcards' import { useLazyGenericGetRequestQuery } from 'src/store/api/app' @@ -30,6 +31,7 @@ export default function UserActions({ tenantDomain, userId, userEmail, className } const editLink = `/identity/administration/users/edit?tenantDomain=${tenantDomain}&userId=${userId}` + const editMailboxLink = `/email/administration/edit-mailbox-permissions?tenantDomain=${tenantDomain}&userId=${userId}` const actions = [ { @@ -37,6 +39,11 @@ export default function UserActions({ tenantDomain, userId, userEmail, className link: editLink, icon: faCog, }, + { + label: 'Edit Mailbox Permissions', + link: editMailboxLink, + icon: faEdit, + }, { label: 'Send MFA Push', link: '#', From 0a1abb102089565ad6cf2bbd73c44b98a47a3de7 Mon Sep 17 00:00:00 2001 From: John Duprey Date: Fri, 20 Oct 2023 21:39:47 -0400 Subject: [PATCH 13/40] Tenant Access Check - Add cellTableFormatter - Increase column size --- src/views/cipp/CIPPSettings.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/views/cipp/CIPPSettings.js b/src/views/cipp/CIPPSettings.js index b46e9165e005..985dc4af7251 100644 --- a/src/views/cipp/CIPPSettings.js +++ b/src/views/cipp/CIPPSettings.js @@ -83,6 +83,8 @@ import { Buffer } from 'buffer' import Extensions from 'src/data/Extensions.json' import { CellDelegatedPrivilege } from 'src/components/tables/CellDelegatedPrivilege' import { TableModalButton } from 'src/components/buttons' +import { cellTableFormatter } from 'src/components/tables/CellTable' +import { cellGenericFormatter } from 'src/components/tables/CellGenericFormat' const CIPPSettings = () => { const [active, setActive] = useState(1) @@ -151,16 +153,29 @@ const checkAccessColumns = [ name: 'Tenant Domain', selector: (row) => row['TenantName'], grow: 0, + cell: cellGenericFormatter(), }, { name: 'Result', selector: (row) => row['Status'], minWidth: '380px', maxWidth: '380px', + cell: cellGenericFormatter(), }, { name: 'Missing GDAP Roles', - selector: (row) => row['GDAP'], + selector: (row) => row?.MissingRoles, + cell: cellTableFormatter('MissingRoles'), + }, + { + name: 'Tenant Roles', + selector: (row) => row?.GDAPRoles, + cell: cellTableFormatter('GDAPRoles'), + }, + { + name: 'SAM User Roles', + selector: (row) => row?.SAMUserRoles, + cell: cellTableFormatter('SAMUserRoles'), }, ] @@ -482,7 +497,7 @@ const GeneralSettings = () => { - + Tenant Access Check From 8631d8bde3ac7ac88bdfe58c2a84ae371a8353ba Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Sun, 22 Oct 2023 16:44:19 +0200 Subject: [PATCH 14/40] improvements to table looks --- src/components/tables/CellTable.js | 38 ++++-- src/views/cipp/CIPPSettings.js | 190 +++++++++++++---------------- 2 files changed, 118 insertions(+), 110 deletions(-) diff --git a/src/components/tables/CellTable.js b/src/components/tables/CellTable.js index 004cdb715c48..c874a6854920 100644 --- a/src/components/tables/CellTable.js +++ b/src/components/tables/CellTable.js @@ -3,16 +3,22 @@ import { CButton } from '@coreui/react' import { ModalService } from '../utilities' import { CBadge } from '@coreui/react' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' -import { faCheckCircle } from '@fortawesome/free-solid-svg-icons' +import { faCheckCircle, faTimesCircle } from '@fortawesome/free-solid-svg-icons' // 1. Import the required FontAwesome icon import { cellGenericFormatter } from './CellGenericFormat' -export default function cellTable(row, column, propertyName) { +export default function cellTable( + row, + column, + propertyName, + checkWhenZero = false, + crossWhenZero = false, +) { const handleTable = ({ row }) => { const QueryColumns = [] const columns = Object.keys(row[propertyName][0]).map((key) => { QueryColumns.push({ name: key, - selector: (row) => row[key], // Accessing the property using the key + selector: (row) => row[key], sortable: true, exportSelector: key, cell: cellGenericFormatter(), @@ -29,8 +35,24 @@ export default function cellTable(row, column, propertyName) { size: 'lg', }) } + //if the row propertyName is a bool, then return a check or cross + if (typeof row[propertyName] === 'boolean') { + if (row[propertyName]) { + return + } + return + } - if (!row[propertyName] || !Array.isArray(row[propertyName]) || row.length === 0) { + if (!row[propertyName] || !Array.isArray(row[propertyName]) || row[propertyName].length === 0) { + if (row[propertyName] === undefined) { + return + } + if (checkWhenZero) { + return + } + if (crossWhenZero) { + return + } return } @@ -41,6 +63,8 @@ export default function cellTable(row, column, propertyName) { ) } -export const cellTableFormatter = (propertyName) => (row, index, column, id) => { - return cellTable(row, column, propertyName) -} +export const cellTableFormatter = + (propertyName, checkWhenZero = false, crossWhenZero = false) => + (row, index, column, id) => { + return cellTable(row, column, propertyName, checkWhenZero, crossWhenZero) + } diff --git a/src/views/cipp/CIPPSettings.js b/src/views/cipp/CIPPSettings.js index 985dc4af7251..f4e300e0c215 100644 --- a/src/views/cipp/CIPPSettings.js +++ b/src/views/cipp/CIPPSettings.js @@ -85,6 +85,7 @@ import { CellDelegatedPrivilege } from 'src/components/tables/CellDelegatedPrivi import { TableModalButton } from 'src/components/buttons' import { cellTableFormatter } from 'src/components/tables/CellTable' import { cellGenericFormatter } from 'src/components/tables/CellGenericFormat' +import { check } from 'prettier' const CIPPSettings = () => { const [active, setActive] = useState(1) @@ -165,17 +166,17 @@ const checkAccessColumns = [ { name: 'Missing GDAP Roles', selector: (row) => row?.MissingRoles, - cell: cellTableFormatter('MissingRoles'), + cell: cellTableFormatter('MissingRoles', true, false), }, { - name: 'Tenant Roles', + name: 'Roles available', selector: (row) => row?.GDAPRoles, - cell: cellTableFormatter('GDAPRoles'), + cell: cellTableFormatter('GDAPRoles', false, true), }, { name: 'SAM User Roles', selector: (row) => row?.SAMUserRoles, - cell: cellTableFormatter('SAMUserRoles'), + cell: cellTableFormatter('SAMUserRoles', false, true), }, ] @@ -189,8 +190,6 @@ const GeneralSettings = () => { const [selectedTenants, setSelectedTenants] = useState([]) const [showMaxSelected, setShowMaxSelected] = useState(false) const [tokenOffcanvasVisible, setTokenOffcanvasVisible] = useState(false) - const [runBackup, RunBackupResult] = useLazyGenericGetRequestQuery() - const [restoreBackup, restoreBackupResult] = useLazyGenericPostRequestQuery() const maxSelected = 2 const tenantSelectorRef = useRef(null) @@ -560,68 +559,6 @@ const GeneralSettings = () => { - - - - - Run Backup - - - Click the button below to start a backup of all Settings - runBackup({ path: '/api/ExecRunBackup' })} - disabled={RunBackupResult.isFetching} - className="me-3 mt-3" - > - {RunBackupResult.isFetching && ( - - )} - Run backup - - handleChange(e)} - /> - inputRef.current.click()} - disabled={restoreBackupResult.isFetching} - className="me-3 mt-3" - > - {restoreBackupResult.isFetching && ( - - )} - Restore backup - - {restoreBackupResult.isSuccess && ( - <> - {restoreBackupResult.data.Results} - - )} - {RunBackupResult.isSuccess && ( - <> - - downloadTxtFile(RunBackupResult.data.backup)} - className="m-1" - > - Download Backup - - - - )} - - - - - - - ) } @@ -1371,46 +1308,40 @@ const PasswordSettings = () => { <> {getPasswordConfigResult.isUninitialized && getPasswordConfig({ path: '/api/ExecPasswordConfig?list=true' })} - - - Password Generation - - - Select a password style for generated passwords. - - {resolvers.map((r, index) => ( - switchResolver(r)} - color={ - r === getPasswordConfigResult.data?.Results?.passwordType - ? 'primary' - : 'secondary' - } - key={index} - > - {r} - - ))} - - {(editPasswordConfigResult.isSuccess || editPasswordConfigResult.isError) && ( - - {editPasswordConfigResult.isSuccess - ? editPasswordConfigResult.data.Results - : 'Error setting password style'} - - )} - - +

    Password Style

    + + {resolvers.map((r, index) => ( + switchResolver(r)} + color={ + r === getPasswordConfigResult.data?.Results?.passwordType ? 'primary' : 'secondary' + } + key={index} + > + {r} + + ))} + + {(editPasswordConfigResult.isSuccess || editPasswordConfigResult.isError) && ( + + {editPasswordConfigResult.isSuccess + ? editPasswordConfigResult.data.Results + : 'Error setting password style'} + + )} ) } const DNSSettings = () => { + const [runBackup, RunBackupResult] = useLazyGenericGetRequestQuery() + const [restoreBackup, restoreBackupResult] = useLazyGenericPostRequestQuery() const [getDnsConfig, getDnsConfigResult] = useLazyGetDnsConfigQuery() const [editDnsConfig, editDnsConfigResult] = useLazyEditDnsConfigQuery() + const inputRef = useRef(null) const [alertVisible, setAlertVisible] = useState(false) @@ -1431,10 +1362,10 @@ const DNSSettings = () => { {getDnsConfigResult.isSuccess && ( - DNS Resolver + Application Settings - Select a DNS resolver to use for Domain Analysis. +

    DNS resolver

    {resolvers.map((r, index) => ( { : 'Error setting resolver'} )} + + + + +

    Settings Backup

    + runBackup({ path: '/api/ExecRunBackup' })} + disabled={RunBackupResult.isFetching} + className="me-3 mt-3" + > + {RunBackupResult.isFetching && ( + + )} + Run backup + + handleChange(e)} + /> + inputRef.current.click()} + disabled={restoreBackupResult.isFetching} + className="me-3 mt-3" + > + {restoreBackupResult.isFetching && ( + + )} + Restore backup + + {restoreBackupResult.isSuccess && ( + <> + {restoreBackupResult.data.Results} + + )} + {RunBackupResult.isSuccess && ( + <> + + downloadTxtFile(RunBackupResult.data.backup)} + className="m-1" + > + Download Backup + + + + )} +
    )} From 9c0b574feda2267d3d05fd863a65863cde15f79b Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Sun, 22 Oct 2023 21:36:48 +0200 Subject: [PATCH 15/40] caps --- src/views/cipp/CIPPSettings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/cipp/CIPPSettings.js b/src/views/cipp/CIPPSettings.js index f4e300e0c215..2ccf00c60bb5 100644 --- a/src/views/cipp/CIPPSettings.js +++ b/src/views/cipp/CIPPSettings.js @@ -1365,7 +1365,7 @@ const DNSSettings = () => { Application Settings -

    DNS resolver

    +

    DNS Resolver

    {resolvers.map((r, index) => ( Date: Mon, 23 Oct 2023 09:39:08 +0200 Subject: [PATCH 16/40] add requireMFAadd requireMFA --- src/data/standards.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/data/standards.json b/src/data/standards.json index 255449b17c3a..292fafc41ac4 100644 --- a/src/data/standards.json +++ b/src/data/standards.json @@ -415,6 +415,12 @@ }, "label": "Set inactive device retirement days" }, + { + "name": "standards.intuneRequireMFA", + "cat": "Intune", + "helpText": "", + "label": "Require Multifactor Authentication to register or join devices with Microsoft Entra" + }, { "name": "standards.sharingCapability.Enabled", "cat": "SharePoint", From eda41a1eda1eb5211cac73e349e5bc6fe2d9df34 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Mon, 23 Oct 2023 11:08:48 +0200 Subject: [PATCH 17/40] Remove mailbox permissions --- src/views/identity/administration/OffboardingWizard.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/identity/administration/OffboardingWizard.js b/src/views/identity/administration/OffboardingWizard.js index a5bf2288504a..052495dfabb8 100644 --- a/src/views/identity/administration/OffboardingWizard.js +++ b/src/views/identity/administration/OffboardingWizard.js @@ -60,6 +60,7 @@ const OffboardingWizard = () => { removeRules: values.RemoveRules, removeMobile: values.RemoveMobile, keepCopy: values.keepCopy, + removePermissions: values.removePermissions, } //alert(JSON.stringify(values, null, 2)) @@ -125,6 +126,7 @@ const OffboardingWizard = () => { + From 5a863dcc81d9df8298f3153d4047088f3da4069b Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Mon, 23 Oct 2023 11:14:40 +0200 Subject: [PATCH 18/40] prettification --- src/views/identity/administration/OffboardingWizard.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/views/identity/administration/OffboardingWizard.js b/src/views/identity/administration/OffboardingWizard.js index 052495dfabb8..71e886944b03 100644 --- a/src/views/identity/administration/OffboardingWizard.js +++ b/src/views/identity/administration/OffboardingWizard.js @@ -262,6 +262,14 @@ const OffboardingWizard = () => { icon={props.values.RemoveRules ? faCheck : faTimes} /> + + Remove all mailbox permissions + + Remove Licenses Date: Mon, 23 Oct 2023 18:20:17 +0200 Subject: [PATCH 19/40] Fix small label error to make labels consistent with the ones found in ApplyStandard.js --- src/views/tenant/standards/ListAppliedStandards.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/tenant/standards/ListAppliedStandards.js b/src/views/tenant/standards/ListAppliedStandards.js index 7f1382a5e149..84d168b995f3 100644 --- a/src/views/tenant/standards/ListAppliedStandards.js +++ b/src/views/tenant/standards/ListAppliedStandards.js @@ -451,7 +451,7 @@ const ListAppliedStandards = () => { name: template.displayName, }))} placeholder="Select a template" - label="Choose your intune templates to apply" + label="Choose your Conditional Access templates to apply" /> )} @@ -473,7 +473,7 @@ const ListAppliedStandards = () => { name: template.name, }))} placeholder="Select a template" - label="Choose your intune templates to apply" + label="Choose your Transport Rule templates to apply" /> )} @@ -494,7 +494,7 @@ const ListAppliedStandards = () => { name: template.Displayname, }))} placeholder="Select a template" - label="Choose your group templates to apply" + label="Choose your Group templates to apply" /> )} From 8716e5544bad646b26beaaa06d5e79286b07e7cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20Kj=C3=A6rg=C3=A5rd?= Date: Mon, 23 Oct 2023 18:21:48 +0200 Subject: [PATCH 20/40] Whoops --- src/views/tenant/standards/ListAppliedStandards.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/tenant/standards/ListAppliedStandards.js b/src/views/tenant/standards/ListAppliedStandards.js index 84d168b995f3..a6e6ce55749a 100644 --- a/src/views/tenant/standards/ListAppliedStandards.js +++ b/src/views/tenant/standards/ListAppliedStandards.js @@ -407,7 +407,7 @@ const ListAppliedStandards = () => { name: template.Displayname, }))} placeholder="Select a template" - label="Choose your intune templates to apply" + label="Choose your Intune templates to apply" /> )} From fa5ab4850eadee99c048b0d3887b63e6344b5517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20Kj=C3=A6rg=C3=A5rd?= Date: Mon, 23 Oct 2023 19:36:30 +0200 Subject: [PATCH 21/40] Move timeout to global standards --- src/data/standards.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/standards.json b/src/data/standards.json index 292fafc41ac4..0fd0665c1aeb 100644 --- a/src/data/standards.json +++ b/src/data/standards.json @@ -332,7 +332,7 @@ }, { "name": "standards.ActivityBasedTimeout", - "cat": "SharePoint", + "cat": "Global", "helpText": "", "addedComponent": null, "label": "Enable 1 hour Activity based Timeout" From 4fc2843f8d777e28c38b1dfcbe8c8d60d9eec4ff Mon Sep 17 00:00:00 2001 From: John Duprey Date: Mon, 23 Oct 2023 21:28:56 -0400 Subject: [PATCH 22/40] CippTable / Access Check Tweaks - Add support for hiding filter in subheader - Add omit property to extended info - Add CFormSwitch toggle to hide or show role details --- src/components/tables/CippTable.js | 29 ++++++----- src/views/cipp/CIPPSettings.js | 81 ++++++++++++++++++------------ 2 files changed, 65 insertions(+), 45 deletions(-) diff --git a/src/components/tables/CippTable.js b/src/components/tables/CippTable.js index 72b3247f2218..75106ab21de4 100644 --- a/src/components/tables/CippTable.js +++ b/src/components/tables/CippTable.js @@ -111,6 +111,7 @@ export default function CippTable({ isModal = false, exportFiltered = false, filterlist, + showFilter = true, tableProps: { keyField = 'id', theme = 'cyberdrain', @@ -468,6 +469,10 @@ export default function CippTable({ ]) } + actions.forEach((action) => { + defaultActions.push(action) + }) + if (!disablePDFExport || !disableCSVExport) { const keys = [] const exportFormatter = {} @@ -578,9 +583,7 @@ export default function CippTable({ , ]) } - actions.forEach((action) => { - defaultActions.push(action) - }) + defaultActions.push([
    - setFilterText(e.target.value)} - onFilterPreset={(e) => { - setFilterText(e) - }} - onClear={handleClear} - filterText={filterText} - filterlist={filterlist} - /> + {showFilter && ( + setFilterText(e.target.value)} + onFilterPreset={(e) => { + setFilterText(e) + }} + onClear={handleClear} + filterText={filterText} + filterlist={filterlist} + /> + )} {defaultActions}
    diff --git a/src/views/cipp/CIPPSettings.js b/src/views/cipp/CIPPSettings.js index 2ccf00c60bb5..8c46d827521f 100644 --- a/src/views/cipp/CIPPSettings.js +++ b/src/views/cipp/CIPPSettings.js @@ -21,6 +21,7 @@ import { CSpinner, CCardText, CTooltip, + CFormSwitch, } from '@coreui/react' import { useGenericGetRequestQuery, @@ -149,40 +150,8 @@ const CIPPSettings = () => { export default CIPPSettings -const checkAccessColumns = [ - { - name: 'Tenant Domain', - selector: (row) => row['TenantName'], - grow: 0, - cell: cellGenericFormatter(), - }, - { - name: 'Result', - selector: (row) => row['Status'], - minWidth: '380px', - maxWidth: '380px', - cell: cellGenericFormatter(), - }, - { - name: 'Missing GDAP Roles', - selector: (row) => row?.MissingRoles, - cell: cellTableFormatter('MissingRoles', true, false), - }, - { - name: 'Roles available', - selector: (row) => row?.GDAPRoles, - cell: cellTableFormatter('GDAPRoles', false, true), - }, - { - name: 'SAM User Roles', - selector: (row) => row?.SAMUserRoles, - cell: cellTableFormatter('SAMUserRoles', false, true), - }, -] - const GeneralSettings = () => { const { data: versions, isSuccess: isSuccessVersion } = useLoadVersionsQuery() - const { data: tenants = [] } = useListTenantsQuery({ AllTenantSelector: false }) const [checkPermissions, permissionsResult] = useLazyExecPermissionsAccessCheckQuery() const [clearCache, clearCacheResult] = useLazyExecClearCacheQuery() @@ -190,6 +159,7 @@ const GeneralSettings = () => { const [selectedTenants, setSelectedTenants] = useState([]) const [showMaxSelected, setShowMaxSelected] = useState(false) const [tokenOffcanvasVisible, setTokenOffcanvasVisible] = useState(false) + const [showExtendedInfo, setShowExtendedInfo] = useState(true) const maxSelected = 2 const tenantSelectorRef = useRef(null) @@ -204,6 +174,39 @@ const GeneralSettings = () => { } } + const checkAccessColumns = [ + { + name: 'Tenant Domain', + selector: (row) => row['TenantName'], + grow: 0, + cell: cellGenericFormatter(), + }, + { + name: 'Result', + selector: (row) => row['Status'], + minWidth: '380px', + maxWidth: '380px', + cell: cellGenericFormatter(), + }, + { + name: 'Missing GDAP Roles', + selector: (row) => row?.MissingRoles, + cell: cellTableFormatter('MissingRoles', true, false), + }, + { + name: 'Roles available', + selector: (row) => row?.GDAPRoles, + cell: cellTableFormatter('GDAPRoles', false, true), + omit: showExtendedInfo, + }, + { + name: 'SAM User Roles', + selector: (row) => row?.SAMUserRoles, + cell: cellTableFormatter('SAMUserRoles', false, true), + omit: showExtendedInfo, + }, + ] + const handleCheckAccess = () => { const mapped = tenants.reduce( (current, { customerId, ...rest }) => ({ @@ -301,7 +304,16 @@ const GeneralSettings = () => { const tableProps = { pagination: false, - subheader: false, + actions: [ + { + console.log(e) + setShowExtendedInfo(!e.target.checked) + }} + />, + ], } const downloadTxtFile = (data) => { const txtdata = [JSON.stringify(RunBackupResult.data.backup)] @@ -544,6 +556,9 @@ const GeneralSettings = () => { {accessCheckResult.isSuccess && ( Date: Tue, 24 Oct 2023 11:25:01 +0200 Subject: [PATCH 23/40] external link for GA --- src/views/home/Home.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/views/home/Home.js b/src/views/home/Home.js index c802805552af..761be7b0d35d 100644 --- a/src/views/home/Home.js +++ b/src/views/home/Home.js @@ -187,12 +187,8 @@ const Home = () => { - From c9f6c9074db6e3b6f5741a73be60d60d4b6f9de1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20Kj=C3=A6rg=C3=A5rd?= Date: Tue, 24 Oct 2023 18:39:00 +0200 Subject: [PATCH 24/40] Make Universal search remember the user you clicked on --- src/components/utilities/UniversalSearch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/utilities/UniversalSearch.js b/src/components/utilities/UniversalSearch.js index 0dadbe464659..74f2efeb7cd2 100644 --- a/src/components/utilities/UniversalSearch.js +++ b/src/components/utilities/UniversalSearch.js @@ -80,7 +80,7 @@ const ResultsRow = ({ match }) => { const handleClick = () => { dispatch(hideSwitcher()) - navigate(`/identity/administration/users?customerId=${match._tenantId}`) + navigate(`/identity/administration/users?customerId=${match._tenantId}&tableFilter=${match.userPrincipalName}`) } return ( From bc60b6127edd15c83a6d5fa2c12f86ff61a87d09 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Tue, 24 Oct 2023 19:44:40 +0200 Subject: [PATCH 25/40] fix spacing --- src/components/utilities/UniversalSearch.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/utilities/UniversalSearch.js b/src/components/utilities/UniversalSearch.js index 74f2efeb7cd2..0893132265d9 100644 --- a/src/components/utilities/UniversalSearch.js +++ b/src/components/utilities/UniversalSearch.js @@ -17,7 +17,7 @@ export const UniversalSearch = React.forwardRef( const handleKeyDown = (event) => { if (event.key === 'Enter') { - // on enter key, start the search + // on enter key, start the searchs getSearchItems({ path: `/api/ExecUniversalSearch?name=${searchValue}` }) } } @@ -80,7 +80,9 @@ const ResultsRow = ({ match }) => { const handleClick = () => { dispatch(hideSwitcher()) - navigate(`/identity/administration/users?customerId=${match._tenantId}&tableFilter=${match.userPrincipalName}`) + navigate( + `/identity/administration/users?customerId=${match._tenantId}&tableFilter=${match.userPrincipalName}`, + ) } return ( From 9055f2858824559255fb44a033bd43dd903960f3 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Thu, 26 Oct 2023 11:57:31 +0200 Subject: [PATCH 26/40] case sensitivity issue --- src/views/endpoint/intune/MEMListPolicyTemplates.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/endpoint/intune/MEMListPolicyTemplates.js b/src/views/endpoint/intune/MEMListPolicyTemplates.js index 645744383d56..851c6731bedd 100644 --- a/src/views/endpoint/intune/MEMListPolicyTemplates.js +++ b/src/views/endpoint/intune/MEMListPolicyTemplates.js @@ -69,7 +69,7 @@ const AutopilotListTemplates = () => { selector: (row) => row['displayName'], sortable: true, cell: (row) => CellTip(row['displayName']), - exportSelector: 'Displayname', + exportSelector: 'displayName', minWidth: '400px', maxWidth: '400px', }, @@ -78,7 +78,7 @@ const AutopilotListTemplates = () => { selector: (row) => row['description'], sortable: true, cell: (row) => CellTip(row['description']), - exportSelector: 'Description', + exportSelector: 'description', minWidth: '400px', maxWidth: '400px', }, From 13c1736f92ba3cd23a47a49f11a57226047fab50 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Thu, 26 Oct 2023 12:29:02 +0200 Subject: [PATCH 27/40] improvements to cipp-sam --- src/views/cipp/Setup.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/cipp/Setup.js b/src/views/cipp/Setup.js index 603e2a07a0e2..82da760206e7 100644 --- a/src/views/cipp/Setup.js +++ b/src/views/cipp/Setup.js @@ -48,7 +48,10 @@ Error.propTypes = { const Setup = () => { const [setupDone, setSetupdone] = useState(false) - const valbutton = (value) => (setupDone ? undefined : 'You must finish the wizard.') + const valbutton = (value) => + getResults.data?.step < 5 + ? undefined + : `You must finish the setup process. you are currently at step ${getResults.data?.step} of 5.` const [genericPostRequest, postResults] = useLazyGenericPostRequestQuery() const [genericGetRequest, getResults] = useLazyGenericGetRequestQuery() const onSubmit = (values) => { From b557a239d012761786ddb6a86b093d6a1b46c6aa Mon Sep 17 00:00:00 2001 From: BNWEIN Date: Thu, 26 Oct 2023 11:42:16 +0100 Subject: [PATCH 28/40] Update ListAppliedStandards.js Removed Duplicated Success Message --- src/views/tenant/standards/ListAppliedStandards.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/views/tenant/standards/ListAppliedStandards.js b/src/views/tenant/standards/ListAppliedStandards.js index a6e6ce55749a..bf56b10ffbe2 100644 --- a/src/views/tenant/standards/ListAppliedStandards.js +++ b/src/views/tenant/standards/ListAppliedStandards.js @@ -383,9 +383,6 @@ const ListAppliedStandards = () => { ))} - {postResults.isSuccess && ( - {postResults.data.Results} - )}
    Templates

    From 0752d4b01b646a73b1b900e776e6aa7c72ac728b Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Thu, 26 Oct 2023 19:41:04 +0200 Subject: [PATCH 29/40] added complex filter licenses --- src/views/identity/reports/MFAReport.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/identity/reports/MFAReport.js b/src/views/identity/reports/MFAReport.js index da29c7e33b87..5dbae89bb4ad 100644 --- a/src/views/identity/reports/MFAReport.js +++ b/src/views/identity/reports/MFAReport.js @@ -134,7 +134,7 @@ const MFAList = () => { datatable={{ filterlist: [ { filterName: 'Enabled users', filter: '"accountEnabled":true' }, - { filterName: 'Licensed users', filter: '"isLicensed":"true"' }, + { filterName: 'Licensed users', filter: 'Complex: IsLicensed eq true' }, ], columns: tenant.defaultDomainName === 'AllTenants' ? Altcolumns : columns, path: '/api/ListMFAUsers', From c9e06094c8272b14d256aa546718c95379f4216d Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Thu, 26 Oct 2023 20:42:41 +0200 Subject: [PATCH 30/40] add standard --- src/data/standards.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/data/standards.json b/src/data/standards.json index 0fd0665c1aeb..328a668fdc85 100644 --- a/src/data/standards.json +++ b/src/data/standards.json @@ -267,6 +267,13 @@ }, "label": "Set Outbound Spam Alert e-mail" }, + { + "name": "standards.SafeSendersDisable", + "cat": "Exchange", + "helpText": "", + "addedComponent": null, + "label": "Remove Safe Senders to prevent SPF bypass" + }, { "name": "standards.DisableSharedMailbox", "cat": "Exchange", From 073e0336cc068a4102746446306ccffbeac180a0 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Thu, 26 Oct 2023 21:12:46 +0200 Subject: [PATCH 31/40] Fix bug with showing logs --- src/views/cipp/Logs.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/views/cipp/Logs.js b/src/views/cipp/Logs.js index dc128d9a9721..22862da55ea2 100644 --- a/src/views/cipp/Logs.js +++ b/src/views/cipp/Logs.js @@ -107,7 +107,7 @@ const Logs = () => { const DateFilter = query.get('DateFilter') //const [genericPostRequest, postResults] = useLazyGenericPostRequestQuery() const [visibleA, setVisibleA] = useState(false) - const [startDate, setStartDate] = useState(new Date()) + const [startDate, setStartDate] = useState(DateFilter ? new Date(DateFilter) : new Date()) const handleSubmit = async (values) => { Object.keys(values).filter(function (x) { if (values[x] === null) { @@ -115,11 +115,13 @@ const Logs = () => { } return null }) + console.log(startDate) const shippedValues = { SearchNow: true, - DateFilter: startDate.toLocaleDateString('en-GB').split('/').reverse().join(''), + DateFilter: startDate.toISOString().split('T')[0].replace(/-/g, ''), ...values, } + console.log(shippedValues) var queryString = Object.keys(shippedValues) .map((key) => key + '=' + shippedValues[key]) .join('&') @@ -154,7 +156,7 @@ const Logs = () => { initialValues={{ Severity: severity, user: user, - DateFilter: DateFilter, + DateFilter: startDate.toISOString().split('T')[0].replace(/-/g, ''), }} onSubmit={handleSubmit} render={({ handleSubmit, submitting, values }) => { From 406355acc57961c0d241cebcdce808fe3538f81f Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Thu, 26 Oct 2023 21:22:03 +0200 Subject: [PATCH 32/40] removed console.logs --- src/views/cipp/Logs.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/views/cipp/Logs.js b/src/views/cipp/Logs.js index 22862da55ea2..0d339880d1ff 100644 --- a/src/views/cipp/Logs.js +++ b/src/views/cipp/Logs.js @@ -115,13 +115,11 @@ const Logs = () => { } return null }) - console.log(startDate) const shippedValues = { SearchNow: true, DateFilter: startDate.toISOString().split('T')[0].replace(/-/g, ''), ...values, } - console.log(shippedValues) var queryString = Object.keys(shippedValues) .map((key) => key + '=' + shippedValues[key]) .join('&') From 9573b96cf9a57cbfbc0f115b80272a87bb648c29 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Fri, 27 Oct 2023 00:26:49 +0200 Subject: [PATCH 33/40] Add custom group support for apps --- .../applications/ApplicationsAddChocoApp.js | 17 ++++++++++++++++- .../endpoint/applications/ApplicationsAddRMM.js | 15 +++++++++++++++ .../applications/ApplicationsAddWinGet.js | 16 ++++++++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) diff --git a/src/views/endpoint/applications/ApplicationsAddChocoApp.js b/src/views/endpoint/applications/ApplicationsAddChocoApp.js index 4b46dcec0efa..6f518d6f5d07 100644 --- a/src/views/endpoint/applications/ApplicationsAddChocoApp.js +++ b/src/views/endpoint/applications/ApplicationsAddChocoApp.js @@ -18,6 +18,7 @@ import { CippWizard } from 'src/components/layout' import { WizardTableField } from 'src/components/tables' import PropTypes from 'prop-types' import { + Condition, RFFCFormCheck, RFFCFormInput, RFFCFormRadio, @@ -57,6 +58,9 @@ const ApplyStandard = () => { values.selectedTenants.map( (tenant) => (values[`Select_${tenant.defaultDomainName}`] = tenant.defaultDomainName), ) + if (values.AssignTo === 'customGroup') { + values.AssignTo = values.customGroup + } genericPostRequest({ path: '/api/AddChocoApp', values: values }) } const handleSearch = async ({ searchString, customRepo }) => { @@ -87,7 +91,6 @@ const ApplyStandard = () => { console.log(value) return obj.packagename === value }) - console.log(template[0]) onChange(template[0][set]) }} @@ -246,6 +249,18 @@ const ApplyStandard = () => { name="AssignTo" label="Assign to all users and devices" > + + + +

    diff --git a/src/views/endpoint/applications/ApplicationsAddRMM.js b/src/views/endpoint/applications/ApplicationsAddRMM.js index 5d994c7dbbca..da43bbca5a29 100644 --- a/src/views/endpoint/applications/ApplicationsAddRMM.js +++ b/src/views/endpoint/applications/ApplicationsAddRMM.js @@ -37,6 +37,9 @@ const AddRMM = () => { values.selectedTenants.map( (tenant) => (values[`Select_${tenant.defaultDomainName}`] = tenant.defaultDomainName), ) + if (values.AssignTo === 'customGroup') { + values.AssignTo = values.customGroup + } genericPostRequest({ path: '/api/AddMSPApp', values: values }) } @@ -312,6 +315,18 @@ const AddRMM = () => { name="AssignTo" label="Assign to all users and devices" > + + + +
    diff --git a/src/views/endpoint/applications/ApplicationsAddWinGet.js b/src/views/endpoint/applications/ApplicationsAddWinGet.js index 14424f1390a9..72a1dc7937f4 100644 --- a/src/views/endpoint/applications/ApplicationsAddWinGet.js +++ b/src/views/endpoint/applications/ApplicationsAddWinGet.js @@ -18,6 +18,7 @@ import { CippWizard } from 'src/components/layout' import { WizardTableField } from 'src/components/tables' import PropTypes from 'prop-types' import { + Condition, RFFCFormCheck, RFFCFormInput, RFFCFormRadio, @@ -54,6 +55,9 @@ const AddWinGet = () => { const [searchPostRequest, foundPackages] = useLazyGenericPostRequestQuery() const handleSubmit = async (values) => { + if (values.AssignTo === 'customGroup') { + values.AssignTo = values.customGroup + } values.selectedTenants.map( (tenant) => (values[`Select_${tenant.defaultDomainName}`] = tenant.defaultDomainName), ) @@ -240,6 +244,18 @@ const AddWinGet = () => { name="AssignTo" label="Assign to all users and devices" > + + + + From 060509e2185b7dc78ff2dc8051b0a71dbac2f834 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Fri, 27 Oct 2023 00:42:01 +0200 Subject: [PATCH 34/40] add removal of standards from table --- .../tenant/standards/ListAppliedStandards.js | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/src/views/tenant/standards/ListAppliedStandards.js b/src/views/tenant/standards/ListAppliedStandards.js index bf56b10ffbe2..d22f03d05862 100644 --- a/src/views/tenant/standards/ListAppliedStandards.js +++ b/src/views/tenant/standards/ListAppliedStandards.js @@ -21,6 +21,8 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import Skeleton from 'react-loading-skeleton' import { CippTable } from 'src/components/tables' import allStandardsList from 'src/data/standards' +import { useState } from 'react' +import CippCodeOffCanvas from 'src/components/utilities/CippCodeOffcanvas' const RefreshAction = () => { const [execStandards, execStandardsResults] = useLazyGenericGetRequestQuery() @@ -80,6 +82,43 @@ const DeleteAction = () => { ) } const ListAppliedStandards = () => { + const [ExecuteGetRequest, getResults] = useLazyGenericGetRequestQuery() + + const Offcanvas = (row, rowIndex, formatExtraData) => { + const [ocVisible, setOCVisible] = useState(false) + const handleDeleteIntuneTemplate = (apiurl, message) => { + ModalService.confirm({ + title: 'Confirm', + body:
    {message}
    , + onConfirm: () => ExecuteGetRequest({ path: apiurl }), + confirmLabel: 'Continue', + cancelLabel: 'Cancel', + }) + } + return ( + <> + + handleDeleteIntuneTemplate( + `api/RemoveStandard?ID=${row.displayName}`, + 'Do you want to delete this standard?', + ) + } + > + + + setOCVisible(false)} + /> + + ) + } const tenantDomain = useSelector((state) => state.app.currentTenant.defaultDomainName) const [genericPostRequest, postResults] = useLazyGenericPostRequestQuery() @@ -124,6 +163,11 @@ const ListAppliedStandards = () => { sortable: true, exportSelector: 'StandardsExport', }, + { + name: 'Actions', + cell: Offcanvas, + maxWidth: '80px', + }, ] const [intuneGetRequest, intuneTemplates] = useLazyGenericGetRequestQuery() const [transportGetRequest, transportTemplates] = useLazyGenericGetRequestQuery() @@ -530,6 +574,10 @@ const ListAppliedStandards = () => { {listStandardsAllTenants && ( + {getResults.isLoading && } + {getResults.isSuccess && ( + {getResults.data?.Results} + )} Date: Fri, 27 Oct 2023 01:20:00 +0200 Subject: [PATCH 35/40] added custom groups for intune --- src/views/endpoint/intune/MEMAddPolicy.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/views/endpoint/intune/MEMAddPolicy.js b/src/views/endpoint/intune/MEMAddPolicy.js index 327954c91f40..f87f6b87dd2a 100644 --- a/src/views/endpoint/intune/MEMAddPolicy.js +++ b/src/views/endpoint/intune/MEMAddPolicy.js @@ -45,6 +45,9 @@ const AddPolicy = () => { (tenant) => (values[`Select_${tenant.defaultDomainName}`] = tenant.defaultDomainName), ) values.TemplateType = values.Type + if (values.AssignTo === 'customGroup') { + values.AssignTo = values.customGroup + } genericPostRequest({ path: '/api/AddPolicy', values: values }) } const [matchMap, setMatchMap] = useState([]) @@ -234,6 +237,18 @@ const AddPolicy = () => { name="AssignTo" label="Assign to all users and devices" > + + + +
    From c59af15c1f321999f50c0d9ccde66881fa375f37 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Fri, 27 Oct 2023 01:41:31 +0200 Subject: [PATCH 36/40] add autoextend button --- .../administration/ListGDAPRelationships.js | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/views/tenant/administration/ListGDAPRelationships.js b/src/views/tenant/administration/ListGDAPRelationships.js index a5703bd84b22..ee162af21975 100644 --- a/src/views/tenant/administration/ListGDAPRelationships.js +++ b/src/views/tenant/administration/ListGDAPRelationships.js @@ -34,7 +34,7 @@ const RefreshAction = () => { {isLoading && } {error && } {isSuccess && } - Map GDAP Groups + Map recently approved relationships ) } @@ -89,6 +89,13 @@ const Actions = (row, rowIndex, formatExtraData) => { title={'GDAP - ' + row?.customer?.displayName} extendedInfo={extendedInfo} actions={[ + { + label: 'Enable automatic extension', + color: 'info', + modal: true, + modalUrl: `/api/ExecAutoExtendGDAP?ID=${row.id}`, + modalMessage: 'Are you sure you want to enable auto-extend for this relationship', + }, { label: 'Terminate Relationship', color: 'danger', @@ -149,6 +156,13 @@ const GDAPRelationships = () => { exportSelector: 'endDateTime', cell: cellDateFormatter({ format: 'short' }), }, + { + name: 'Auto Extend', + selector: (row) => row['autoExtendDuration'], + sortable: true, + exportSelector: 'endDateTime', + cell: (row) => (row['autoExtendDuration'] === 'PT0S' ? 'No' : 'Yes'), + }, { name: 'Actions', cell: Actions, @@ -158,6 +172,7 @@ const GDAPRelationships = () => { return (
    } capabilities={{ allTenants: true, helpContext: 'https://google.com' }} title="GDAP Relationship List" tenantSelector={false} @@ -176,8 +191,13 @@ const GDAPRelationships = () => { modalUrl: `/api/ExecDeleteGDAPRelationship?&GDAPID=!id`, modalMessage: 'Are you sure you want to terminate these relationships?', }, + { + label: 'Auto Extend Relationship', + modal: true, + modalUrl: `/api/ExecAutoExtendGDAP&ID=!id`, + modalMessage: 'Are you sure you want to enable automatic extension?', + }, ], - actions: [], }, keyField: 'id', columns, From f34fe8f5c99b6acb0e1ecf4add98335861ee6f4e Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Fri, 27 Oct 2023 01:43:02 +0200 Subject: [PATCH 37/40] fix bulk extend --- src/views/tenant/administration/ListGDAPRelationships.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/tenant/administration/ListGDAPRelationships.js b/src/views/tenant/administration/ListGDAPRelationships.js index ee162af21975..dcba0648a907 100644 --- a/src/views/tenant/administration/ListGDAPRelationships.js +++ b/src/views/tenant/administration/ListGDAPRelationships.js @@ -194,7 +194,7 @@ const GDAPRelationships = () => { { label: 'Auto Extend Relationship', modal: true, - modalUrl: `/api/ExecAutoExtendGDAP&ID=!id`, + modalUrl: `/api/ExecAutoExtendGDAP?ID=!id`, modalMessage: 'Are you sure you want to enable automatic extension?', }, ], From ca4ad83aeee510b792bd819b11db0722a3ecae38 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Fri, 27 Oct 2023 13:38:06 +0200 Subject: [PATCH 38/40] uncomment migration tool becasue extra month --- src/_nav.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/_nav.js b/src/_nav.js index 4933192c1a26..623201a42809 100644 --- a/src/_nav.js +++ b/src/_nav.js @@ -263,7 +263,7 @@ const _nav = [ name: 'GDAP Roles', to: '/tenant/administration/gdap-roles', }, - /*{ + { component: CNavItem, name: 'Migration Wizard', to: '/tenant/administration/gdap', @@ -272,7 +272,7 @@ const _nav = [ component: CNavItem, name: 'GDAP Migration Status', to: '/tenant/administration/gdap-status', - },*/ + }, { component: CNavItem, name: 'Invite Wizard', @@ -283,12 +283,6 @@ const _nav = [ name: 'GDAP Relationships', to: '/tenant/administration/gdap-relationships', }, - { - component: CNavItem, - name: 'Documentation', - href: 'https://cipp.app/docs/user/usingcipp/GDAP/migration', - target: '_blank', - }, ], }, { From 12872b8cb81e400730195dc973ee7b0c64234977 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Fri, 27 Oct 2023 14:04:12 +0200 Subject: [PATCH 39/40] old content --- src/_nav.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/_nav.js b/src/_nav.js index 623201a42809..852e4334d8cb 100644 --- a/src/_nav.js +++ b/src/_nav.js @@ -332,15 +332,6 @@ const _nav = [ }, ], }, - // Coming in another branch (heads up) - //{ - //component: CNavGroup, - //name: 'Vulnerabilities', - //section: 'Security & Compliance', - //to: '/security/vulnerabilities', - //icon: , - //items: [], - //}, { component: CNavGroup, name: 'Defender', From 34a8a1a0ef3f9b02c06d254cd9354048379a783e Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Fri, 27 Oct 2023 14:17:17 +0200 Subject: [PATCH 40/40] upped version --- public/version_latest.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/version_latest.txt b/public/version_latest.txt index 64b5ae3938a0..ae153944ee8b 100644 --- a/public/version_latest.txt +++ b/public/version_latest.txt @@ -1 +1 @@ -4.4.0 \ No newline at end of file +4.5.0 \ No newline at end of file