Skip to content

Commit

Permalink
Merge branch 'KelvinTegelaar:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
psreekumarinfx authored Jun 24, 2024
2 parents 229b7b5 + 3acfdb1 commit 6d31e01
Show file tree
Hide file tree
Showing 29 changed files with 802 additions and 128 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cipp",
"version": "5.8.5",
"version": "5.9.0",
"description": "The CyberDrain Improved Partner Portal is a portal to help manage administration for Microsoft Partners.",
"homepage": "https://cipp.app/",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion public/version_latest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.8.5
5.9.0
10 changes: 10 additions & 0 deletions src/_nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ const _nav = [
name: 'Users',
to: '/identity/administration/users',
},
{
component: CNavItem,
name: 'Risky Users',
to: '/identity/administration/risky-users',
},
{
component: CNavItem,
name: 'Groups',
Expand Down Expand Up @@ -114,6 +119,11 @@ const _nav = [
name: 'AAD Connect Report',
to: '/identity/reports/azure-ad-connect-report',
},
{
component: CNavItem,
name: 'Risk Detections',
to: '/identity/reports/risk-detections',
},
],
},
{
Expand Down
18 changes: 12 additions & 6 deletions src/components/forms/RFFComponents.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -470,19 +470,25 @@ RFFCFormSelect.propTypes = {
export function Condition({ when, is, children, like, regex }) {
return (
<>
{is && (
{is !== undefined && (
<Field name={when} subscription={{ value: true }}>
{({ input: { value } }) => (value === is ? children : null)}
{({ input: { value } }) => {
return value === is ? children : null
}}
</Field>
)}
{like && (
{like !== undefined && (
<Field name={when} subscription={{ value: true }}>
{({ input: { value } }) => (value.includes(like) ? children : null)}
{({ input: { value } }) => {
return value.includes(like) ? children : null
}}
</Field>
)}
{regex && (
{regex !== undefined && (
<Field name={when} subscription={{ value: true }}>
{({ input: { value } }) => (value.match(regex) ? children : null)}
{({ input: { value } }) => {
return value.match(regex) ? children : null
}}
</Field>
)}
</>
Expand Down
26 changes: 25 additions & 1 deletion src/components/layout/AppHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ import { AppHeaderSearch } from 'src/components/header'
import { CippActionsOffcanvas, TenantSelector } from '../utilities'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faBars } from '@fortawesome/free-solid-svg-icons'
import { setCurrentTheme, setUserSettings, toggleSidebarShow } from 'src/store/features/app'
import {
setCurrentTheme,
setSetupCompleted,
setUserSettings,
toggleSidebarShow,
} from 'src/store/features/app'
import { useMediaPredicate } from 'react-media-hook'
import {
useGenericGetRequestQuery,
Expand Down Expand Up @@ -92,6 +97,25 @@ const AppHeader = () => {
}
}, [delay, state])
}
//useEffect to check if any of the dashboard alerts contained the key "setupCompleted" and if so,
//check if the value of this key is false. If so, set the setupCompleted state to false
//if none is found, set the setupCompleted state to true
useEffect(() => {
if (dashboard && Array.isArray(dashboard) && dashboard.length >= 1) {
console.log('Finding if setup is completed.')
const setupCompleted = dashboard.find((alert) => alert && alert.setupCompleted === false)
if (setupCompleted) {
console.log("Setup isn't completed yet, we found a match with false.")
dispatch(setSetupCompleted({ setupCompleted: false }))
} else {
console.log('Setup is completed.')
dispatch(setSetupCompleted({ setupCompleted: true }))
}
} else {
console.log('Setup is completed.')
dispatch(setSetupCompleted({ setupCompleted: true }))
}
}, [dashboard, dispatch])

useEffect(() => {
if (cippQueueList.isUninitialized && (cippQueueList.isFetching || cippQueueList.isLoading)) {
Expand Down
8 changes: 7 additions & 1 deletion src/components/tables/CippTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,13 @@ export default function CippTable({
if (typeof value === 'object' && !Array.isArray(value)) {
Object.assign(output, flatten(value, newKey))
} else {
output[newKey] = value
if (Array.isArray(value)) {
value.map((item, idx) => {
Object.assign(output, flatten(item, `${newKey}[${idx}]`))
})
} else {
output[newKey] = value
}
}
return output
}, {})
Expand Down
2 changes: 1 addition & 1 deletion src/components/utilities/CippActionsOffcanvas.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ export default function CippActionsOffcanvas(props) {
}
let actionsSelectorsContent
try {
actionsSelectorsContent = props.actionsSelect.map((action, index) => (
actionsSelectorsContent = props?.actionsSelect?.map((action, index) => (
<CListGroupItem className="" component="label" color={action.color} key={index}>
{action.label}
<CListGroupItem
Expand Down
140 changes: 126 additions & 14 deletions src/data/standards.json
Original file line number Diff line number Diff line change
Expand Up @@ -855,22 +855,38 @@
"label": "Publishing Editor - The user can create, read, edit, and delete all items in the folder, and create subfolders.",
"value": "PublishingEditor"
},
{
"label": "Editor - The user can create items in the folder. The contents of the folder do not appear.",
"value": "Editor"
},
{
"label": "Publishing Author. The user can read, create all items/subfolders. Can modify and delete only items they create.",
"value": "PublishingAuthor"
},
{
"label": "Author - The user can create and read items, and modify and delete items that they create.",
"value": "Author"
},
{
"label": "Non Editing Author - The user has full read access and create items. Can can delete only own items.",
"value": "NonEditingAuthor"
},
{
"label": "Reviewer - The user can read all items in the folder.",
"value": "Reviewer"
},
{
"label": "Editor - The user can create items in the folder. The contents of the folder do not appear.",
"label": "Contributor - The user can create items and folders.",
"value": "Contributor"
},
{
"label": "Limited Details - The user can view free/busy time within the calendar and the subject and location of appointments.",
"value": "LimitedDetails"
},
{
"label": "Availability Only - Indicates that the user can view only free/busy time within the calendar.",
"value": "AvailabilityOnly"
},
{
"label": "Limited Details - The user can view free/busy time within the calendar and the subject and location of appointments.",
"value": "LimitedDetails"
},
{
"label": "None - The user has no permissions on the folder.",
"value": "none"
Expand Down Expand Up @@ -1366,6 +1382,67 @@
"impact": "Low Impact",
"impactColour": "info"
},
{
"name": "standards.intuneBrandingProfile",
"cat": "Intune Standards",
"tag": ["lowimpact"],
"helpText": "Sets the branding profile for the Intune Company Portal app. This is a tenant wide setting and overrules any settings set on the app level.",
"addedComponent": [
{
"type": "input",
"name": "standards.intuneBrandingProfile.displayName",
"label": "Organization name"
},
{
"type": "boolean",
"name": "standards.intuneBrandingProfile.showLogo",
"label": "Show logo"
},
{
"type": "boolean",
"name": "standards.intuneBrandingProfile.showDisplayNameNextToLogo",
"label": "Show organization name next to logo"
},
{
"type": "input",
"name": "standards.intuneBrandingProfile.contactITName",
"label": "Contact IT name"
},
{
"type": "input",
"name": "standards.intuneBrandingProfile.contactITPhoneNumber",
"label": "Contact IT phone number"
},
{
"type": "input",
"name": "standards.intuneBrandingProfile.contactITEmailAddress",
"label": "Contact IT email address"
},
{
"type": "input",
"name": "standards.intuneBrandingProfile.contactITNotes",
"label": "Contact IT notes"
},
{
"type": "input",
"name": "standards.intuneBrandingProfile.onlineSupportSiteName",
"label": "Online support site name"
},
{
"type": "input",
"name": "standards.intuneBrandingProfile.onlineSupportSiteUrl",
"label": "Online support site URL"
},
{
"type": "input",
"name": "standards.intuneBrandingProfile.privacyUrl",
"label": "Privacy statement URL"
}
],
"label": "Set Intune Company Portal branding profile",
"impact": "Low Impact",
"impactColour": "info"
},
{
"name": "standards.intuneDeviceReg",
"cat": "Intune Standards",
Expand Down Expand Up @@ -1401,6 +1478,22 @@
"impact": "Low Impact",
"impactColour": "info"
},
{
"name": "standards.TenantDefaultTimezone",
"cat": "SharePoint Standards",
"tag": ["lowimpact"],
"helpText": "Sets the default timezone for the tenant. This will be used for all new users and sites.",
"addedComponent": [
{
"type": "TimezoneSelect",
"name": "standards.TenantDefaultTimezone.Timezone",
"label": "Timezone"
}
],
"label": "Set Default Timezone for Tenant",
"impact": "Low Impact",
"impactColour": "info"
},
{
"name": "standards.DisableAddShortcutsToOneDrive",
"cat": "SharePoint Standards",
Expand Down Expand Up @@ -1517,19 +1610,38 @@
"impactColour": "danger"
},
{
"name": "standards.TenantDefaultTimezone",
"name": "standards.sharingDomainRestriction",
"cat": "SharePoint Standards",
"tag": ["lowimpact"],
"helpText": "Sets the default timezone for the tenant. This will be used for all new users and sites.",
"tag": ["highimpact", "CIS"],
"helpText": "Restricts sharing to only users with the specified domain. This is useful for organizations that only want to share with their own domain.",
"addedComponent": [
{
"type": "TimezoneSelect",
"name": "standards.TenantDefaultTimezone.Timezone",
"label": "Timezone"
"type": "Select",
"name": "standards.sharingDomainRestriction.Mode",
"label": "Limit external sharing by domains",
"values": [
{
"label": "Off",
"value": "none"
},
{
"label": "Restirct sharing to specific domains",
"value": "allowList"
},
{
"label": "Block sharing to specific domains",
"value": "blockList"
}
]
},
{
"type": "input",
"name": "standards.sharingDomainRestriction.Domains",
"label": "Domains to allow/block, comma separated"
}
],
"label": "Set Default Timezone for Tenant",
"impact": "Low Impact",
"impactColour": "info"
"label": "Restrict sharing to a specific domain",
"impact": "High Impact",
"impactColour": "danger"
}
]
2 changes: 2 additions & 0 deletions src/importsMap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import React from 'react'
"/identity/administration/jit-admin": React.lazy(() => import('./views/identity/administration/DeployJITAdmin')),
"/identity/administration/ViewBec": React.lazy(() => import('./views/identity/administration/ViewBEC')),
"/identity/administration/users": React.lazy(() => import('./views/identity/administration/Users')),
"/identity/administration/risky-users": React.lazy(() => import('./views/identity/administration/RiskyUsers')),
"/identity/administration/devices": React.lazy(() => import('./views/identity/administration/Devices')),
"/identity/administration/groups/add": React.lazy(() => import('./views/identity/administration/AddGroup')),
"/identity/administration/group-templates": React.lazy(() => import('./views/identity/administration/GroupTemplates')),
Expand All @@ -32,6 +33,7 @@ import React from 'react'
"/identity/reports/inactive-users-report": React.lazy(() => import('./views/identity/reports/InactiveUsers')),
"/identity/reports/Signin-report": React.lazy(() => import('./views/identity/reports/SignIns')),
"/identity/reports/azure-ad-connect-report": React.lazy(() => import('./views/identity/reports/AzureADConnectReport')),
"/identity/reports/risk-detections": React.lazy(() => import('./views/identity/reports/RiskDetections')),
"/tenant/administration/tenants": React.lazy(() => import('./views/tenant/administration/Tenants')),
"/tenant/administration/tenants/edit": React.lazy(() => import('./views/tenant/administration/EditTenant')),
"/tenant/administration/partner-relationships": React.lazy(() => import('./views/tenant/administration/PartnerRelationships')),
Expand Down
12 changes: 12 additions & 0 deletions src/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@
"component": "views/identity/administration/Users",
"allowedRoles": ["admin", "editor", "readonly"]
},
{
"path": "/identity/administration/risky-users",
"name": "Risky Users",
"component": "views/identity/administration/RiskyUsers",
"allowedRoles": ["admin", "editor", "readonly"]
},
{
"path": "/identity/administration/devices",
"name": "Devices",
Expand Down Expand Up @@ -206,6 +212,12 @@
"component": "views/identity/reports/AzureADConnectReport",
"allowedRoles": ["admin", "editor", "readonly"]
},
{
"path": "/identity/reports/risk-detections",
"name": "Risk Detections",
"component": "views/identity/reports/RiskDetections",
"allowedRoles": ["admin", "editor", "readonly"]
},
{
"path": "/tenant",
"name": "Tenant",
Expand Down
5 changes: 5 additions & 0 deletions src/store/features/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const initialState = {
defaultColumns: {},
newUserDefaults: {},
recentPages: [],
setupCompleted: false,
}

export const appSlice = createSlice({
Expand Down Expand Up @@ -62,6 +63,9 @@ export const appSlice = createSlice({
setRecentPages: (state, action) => {
state.recentPages = action.payload?.recentPages
},
setSetupCompleted: (state, action) => {
state.setupCompleted = action.payload?.setupCompleted
},
},
})

Expand All @@ -80,6 +84,7 @@ export const {
setDefaultColumns,
setNewUserDefaults,
setRecentPages,
setSetupCompleted,
} = appSlice.actions

export default persistReducer(
Expand Down
Loading

0 comments on commit 6d31e01

Please sign in to comment.