Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev to reeeelease #1419

Merged
merged 29 commits into from
Mar 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0ef6c46
fixed issue with spoofwarn
KelvinTegelaar Mar 7, 2023
c534464
added option to allow users to set tenantlist.
KelvinTegelaar Mar 8, 2023
f86fa07
Update Devices.js
BNWEIN Mar 8, 2023
7d34567
Merge pull request #1411 from BNWEIN/dev
KelvinTegelaar Mar 10, 2023
3721371
added quota management
KelvinTegelaar Mar 13, 2023
295f46d
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP into dev
KelvinTegelaar Mar 13, 2023
15afc7a
added relationship type clarification
KelvinTegelaar Mar 13, 2023
a21392d
removed console logging commands
KelvinTegelaar Mar 13, 2023
f909dc8
Added ability to delete a group
BNWEIN Mar 14, 2023
b6db742
Merge pull request #1416 from BNWEIN/dev
KelvinTegelaar Mar 14, 2023
1fc741f
add DKIM standards
KelvinTegelaar Mar 14, 2023
10b1efa
updated standards
KelvinTegelaar Mar 14, 2023
b1207c0
Update ServiceHealth.js
BNWEIN Mar 15, 2023
89188ae
enabled sending of body content
KelvinTegelaar Mar 15, 2023
32e7863
added actions to users
KelvinTegelaar Mar 15, 2023
87833b8
groups mass actions
KelvinTegelaar Mar 15, 2023
e4e7c47
added password generator options
KelvinTegelaar Mar 15, 2023
bdaa908
Add mass actions tenant exclusions
KelvinTegelaar Mar 15, 2023
b6de8cb
added universal search
KelvinTegelaar Mar 15, 2023
6f6cb84
removed latest status
KelvinTegelaar Mar 15, 2023
05c2e99
changed basic auth to inactive users reports
KelvinTegelaar Mar 15, 2023
0e1ee07
fix for issues with sending body
KelvinTegelaar Mar 16, 2023
1838ab7
Merge branch 'KelvinTegelaar:dev' into dev
BNWEIN Mar 16, 2023
e57653f
Lighthouse name changes
KelvinTegelaar Mar 16, 2023
d9c14fd
added mass actions
KelvinTegelaar Mar 16, 2023
54461cf
added mass actions
KelvinTegelaar Mar 16, 2023
983f5a2
fixes for weird issue with input field
KelvinTegelaar Mar 16, 2023
6245300
Merge pull request #1418 from BNWEIN/dev
KelvinTegelaar Mar 17, 2023
eecfe9e
upped version for release.
KelvinTegelaar Mar 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/version_latest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.0
3.2.0
4 changes: 2 additions & 2 deletions src/_nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ const _nav = [
},
{
component: CNavItem,
name: 'Basic Auth Report',
to: '/identity/reports/basic-auth-report',
name: 'Inactive Users',
to: '/identity/reports/inactive-users-report',
},
{
component: CNavItem,
Expand Down
75 changes: 61 additions & 14 deletions src/components/tables/CippTable.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { useRef } from 'react'
import { useSelector } from 'react-redux'
import { ExportCsvButton, ExportPDFButton } from 'src/components/buttons'
import {
Expand Down Expand Up @@ -124,6 +124,9 @@ export default function CippTable({
...rest
} = {},
}) {
const inputRef = useRef('')
const [loopRunning, setLoopRunning] = React.useState(false)
const [massResults, setMassResults] = React.useState([])
const [filterText, setFilterText] = React.useState('')
const [updatedColumns, setUpdatedColumns] = React.useState(columns)
const [selectedRows, setSelectedRows] = React.useState(false)
Expand Down Expand Up @@ -205,11 +208,23 @@ export default function CippTable({
</div>
),
title: 'Confirm',
onConfirm: () =>
selectedRows.forEach(function (number) {
console.log(number)
genericGetRequest({ path: modalUrl, refreshParam: number })
}),
onConfirm: async () => {
const resultsarr = []
for (const row of selectedRows) {
setLoopRunning(true)
const urlParams = new URLSearchParams(modalUrl.split('?')[1])
for (let [paramName, paramValue] of urlParams.entries()) {
if (paramValue.startsWith('!')) {
urlParams.set(paramName, row[paramValue.replace('!', '')])
}
}
const NewModalUrl = `${modalUrl.split('?')[0]}?${urlParams.toString()}`
const results = await genericGetRequest({ path: NewModalUrl, refreshParam: row.id })
resultsarr.push(results)
setMassResults(resultsarr)
}
setLoopRunning(false)
},
})
} else {
ModalService.confirm({
Expand All @@ -224,17 +239,37 @@ export default function CippTable({
</div>
),
title: 'Confirm',
onConfirm: () => [
genericPostRequest({
path: modalUrl,
values: { ...modalBody, ...{ input: inputRef.current.value } },
}),
],
onConfirm: async () => {
const resultsarr = []
for (const row of selectedRows) {
setLoopRunning(true)
const urlParams = new URLSearchParams(modalUrl.split('?')[1])
for (let [paramName, paramValue] of urlParams.entries()) {
if (paramValue.toString().startsWith('!')) {
urlParams.set(paramName, row[paramValue.replace('!', '')])
}
}
const newModalBody = {}
for (let [objName, objValue] of Object.entries(modalBody)) {
console.log(objValue)
if (objValue.toString().startsWith('!')) {
newModalBody[objName] = row[objValue.replace('!', '')]
}
}
const NewModalUrl = `${modalUrl.split('?')[0]}?${urlParams.toString()}`
const results = await genericPostRequest({
path: NewModalUrl,
values: { ...modalBody, ...newModalBody, ...{ input: inputRef.current.value } },
})
resultsarr.push(results)
setMassResults(resultsarr)
}
setLoopRunning(false)
},
})
}
}
const executeselectedAction = (item) => {
console.log(item)
handleModal(item.modalMessage, item.modalUrl, item.modalType, item.modalBody, item.modalInput)
}
const defaultActions = []
Expand Down Expand Up @@ -393,6 +428,18 @@ export default function CippTable({
<div>
{(columns.length === updatedColumns.length || !dynamicColumns) && (
<>
{(massResults.length >= 1 || loopRunning) && (
<CCallout color="info">
{massResults.map((message, idx) => {
return <li key={idx}>{message.data.Results}</li>
})}
{loopRunning && (
<li>
<CSpinner size="sm" />
</li>
)}
</CCallout>
)}
<DataTable
customStyles={customStyles}
className="cipp-table"
Expand Down Expand Up @@ -426,7 +473,7 @@ export default function CippTable({
{...rest}
/>
{selectedRows.length >= 1 && (
<CCallout>Selected {selectedRows.length} items </CCallout>
<CCallout>Selected {selectedRows.length} items</CCallout>
)}
</>
)}
Expand Down
12 changes: 7 additions & 5 deletions src/components/utilities/CippProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
import { useLoadClientPrincipalQuery } from 'src/store/api/auth'
import { ThemeSwitcher, UsageLocation, PageSizeSwitcher } from 'src/components/utilities'
import ReportImage from './ReportImage'
import TenantListSelector from './TenantListSelector'

const CippProfile = () => {
const { data: profile, isFetching, isLoading } = useLoadClientPrincipalQuery()
Expand Down Expand Up @@ -52,17 +53,18 @@ const CippProfile = () => {
<PageSizeSwitcher />
</CCol>
</CRow>
<br></br>
<CRow>
<CCol>
<UsageLocation />
<TenantListSelector />
</CCol>
</CRow>
<br></br>
<CRow>
<CCol>
<ReportImage />
</CCol>
<CCol>{!isLoading && <UsageLocation />}</CCol>
</CRow>
<br></br>
<CRow>
<CCol>{!isLoading && <ReportImage />}</CCol>
</CRow>
</>
)
Expand Down
37 changes: 37 additions & 0 deletions src/components/utilities/TenantListSelector.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React from 'react'
import { CButtonGroup, CButton, CCard, CCardHeader } from '@coreui/react'
import { useDispatch, useSelector } from 'react-redux'
import { setTenantList } from 'src/store/features/app'

const TenantListSelector = () => {
const dispatch = useDispatch()
const TenantListSelector = useSelector((state) => state.app.TenantListSelector)

const SwitchPageSize = (value) => {
dispatch(setTenantList({ TenantListSelector: value }))
}

return (
<CCard>
<CCardHeader>Select default Tenant List</CCardHeader>
<CButtonGroup role="group" aria-label="Page Size Switcher">
<CButton
onClick={() => SwitchPageSize(true)}
active={TenantListSelector ? true : false}
color="secondary"
>
Compressed
</CButton>
<CButton
onClick={() => SwitchPageSize(false)}
active={TenantListSelector ? false : true}
color="secondary"
>
Full list
</CButton>
</CButtonGroup>
</CCard>
)
}

export default TenantListSelector
12 changes: 7 additions & 5 deletions src/components/utilities/UniversalSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const UniversalSearch = React.forwardRef(
const handleKeyDown = (event) => {
if (event.key === 'Enter') {
// on enter key, start the search
getSearchItems({ path: `/api/ExecUniversalSearch?SearchObj=${searchValue}` })
getSearchItems({ path: `/api/ExecUniversalSearch?name=${searchValue}` })
}
}

Expand All @@ -28,13 +28,13 @@ export const UniversalSearch = React.forwardRef(
<CFormInput
ref={ref}
type="text"
placeholder="Search users in selected tenant"
placeholder="Search users in any tenant by UPN or Display Name. Requires Lighthouse onboarding"
onKeyDown={handleKeyDown}
onChange={handleChange}
value={searchValue}
/>
</div>
{searchItems.isSuccess && <Results items={searchItems.data} searchValue={searchValue} />}

{searchItems.isFetching && (
<>
<div className="d-flex flex-column m-3">
Expand All @@ -48,6 +48,8 @@ export const UniversalSearch = React.forwardRef(
</div>
</>
)}
{searchItems.isSuccess && <Results items={searchItems.data} searchValue={searchValue} />}
{searchItems.data <= 1 && 'No results found.'}
</div>
)
},
Expand Down Expand Up @@ -78,7 +80,7 @@ const ResultsRow = ({ match }) => {

const handleClick = () => {
dispatch(hideSwitcher())
navigate(`/identity/administration/users?customerId=${match.customerId}`)
navigate(`/identity/administration/users?customerId=${match._tenantId}`)
}

return (
Expand All @@ -88,7 +90,7 @@ const ResultsRow = ({ match }) => {
<div className="flex-grow-1 d-flex flex-column">
<div className="mx-1">{match.displayName}</div>
<div className="mx-1">{match.userPrincipalName}</div>
<small>Found in tenant {match.defaultDomainName}</small>
<small>Found in tenant {match._tenantId}</small>
</div>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion src/components/utilities/UsageLocation.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const UsageLocation = () => {
const dispatch = useDispatch()
const usagelocation = useSelector((state) => state.app.usageLocation)
const Switchusage = (t, n) => {
// console.log(t)
dispatch(setDefaultusageLocation({ usageLocation: t }))
}

Expand Down
18 changes: 16 additions & 2 deletions src/data/standards.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,14 @@
"label": "Enable Auto-expanding archives"
},
{
"name": "standards.SpoofWarn.Enable",
"name": "standards.SpoofWarn.enable",
"cat": "Exchange",
"helpText": "This is the default helptext",
"addedComponent": null,
"label": "Enable Spoofing warnings for Outlook (This e-mail is external identifiers)"
},
{
"name": "standards.SpoofWarn.Disable",
"name": "standards.SpoofWarn.disable",
"cat": "Exchange",
"helpText": "This is the default helptext",
"addedComponent": null,
Expand All @@ -250,6 +250,20 @@
"addedComponent": null,
"label": "Disable daily Insight/Viva reports"
},
{
"name": "standards.RotateDKIM",
"cat": "Exchange",
"helpText": "Rotate DKIM keys that are 1024 bit to 2048 bit",
"addedComponent": null,
"label": "Rotate DKIM keys that are 1024 bit to 2048 bit"
},
{
"name": "standards.AddDKIM",
"cat": "Exchange",
"helpText": "Enables DKIM for all domains that currently support it",
"addedComponent": null,
"label": "Enables DKIM for all domains that currently support it"
},
{
"name": "standards.ActivityBasedTimeout",
"cat": "SharePoint",
Expand Down
4 changes: 2 additions & 2 deletions src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const DeployConditional = React.lazy(() => import('src/views/tenant/conditional/
const ListLicences = React.lazy(() => import('src/views/tenant/administration/ListLicences'))
const ListAppConsent = React.lazy(() => import('src/views/tenant/administration/ListOauthApps'))

const BasicAuthReport = React.lazy(() => import('src/views/identity/reports/BasicAuthReport'))
const BasicAuthReport = React.lazy(() => import('src/views/identity/reports/InactiveUsers'))
const SignInReport = React.lazy(() => import('src/views/identity/reports/SignIns'))

const AzureADConnectReport = React.lazy(() =>
Expand Down Expand Up @@ -267,7 +267,7 @@ const routes = [
{ path: '/endpoint/reports/devices', name: 'Devices', component: Devices },
{ path: '/identity/reports/mfa-report', name: 'MFA Report', component: MFAReport },
{
path: '/identity/reports/basic-auth-report',
path: '/identity/reports/inactive-users-report',
name: 'Basic Auth Report',
component: BasicAuthReport,
},
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 @@ -10,6 +10,7 @@ const initialState = {
currentTheme: 'default',
tablePageSize: 25,
pageSizes: [25, 50, 100, 200, 500],
TenantListSelector: false,
}

export const appSlice = createSlice({
Expand Down Expand Up @@ -40,13 +41,17 @@ export const appSlice = createSlice({
setReportImage: (state, action) => {
state.reportImage = action.payload?.reportImage
},
setTenantList: (state, action) => {
state.TenantListSelector = action.payload?.TenantListSelector
},
},
})

export const {
toggleSidebarShow,
toggleSidebarUnfoldable,
setCurrentTenant,
setTenantList,
setCurrentPageSize,
setCurrentTheme,
setSidebarVisible,
Expand Down
Loading