Skip to content

Dev to HF #2378

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

Merged
merged 10 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cipp",
"version": "5.6.0",
"version": "5.6.1",
"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.6.0
5.6.1
5 changes: 5 additions & 0 deletions src/_nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,11 @@ const _nav = [
name: 'Quarantine',
to: '/email/administration/quarantine',
},
{
component: CNavItem,
name: 'Tenant Allow/Block Lists',
to: '/email/administration/tenant-allow-block-lists',
},
],
},
{
Expand Down
3 changes: 2 additions & 1 deletion src/components/forms/RFFComponents.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,11 @@ export const RFFCFormInput = ({
spellCheck = true,
autoFocus = false,
hiddenValue,
defaultValue,
onChange,
}) => {
return (
<Field initialValue={hiddenValue} name={name} validate={validate}>
<Field defaultValue={defaultValue} initialValue={hiddenValue} name={name} validate={validate}>
{({ input, meta }) => {
const handleChange = onChange
? (e) => {
Expand Down
12 changes: 8 additions & 4 deletions src/data/standards.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@
{
"type": "number",
"name": "standards.NudgeMFA.snoozeDurationInDays",
"label": "Number of days to allow users to skip registering Authenticator (0-14, default is 1)"
"label": "Number of days to allow users to skip registering Authenticator (0-14, default is 1)",
"default": 1
}
],
"label": "Sets the state for the request to setup Authenticator",
Expand Down Expand Up @@ -578,7 +579,8 @@
"type": "number",
"name": "standards.EnableMailTips.MailTipsLargeAudienceThreshold",
"label": "Number of recipients to trigger the large audience MailTip (Default is 25)",
"placeholder": "Enter a profile name"
"placeholder": "Enter a profile name",
"default": 25
}
],
"label": "Enable all MailTips",
Expand Down Expand Up @@ -634,12 +636,14 @@
{
"type": "number",
"name": "standards.SendReceiveLimitTenant.SendLimit",
"label": "Send limit in MB (Default is 35)"
"label": "Send limit in MB (Default is 35)",
"default": 35
},
{
"type": "number",
"name": "standards.SendReceiveLimitTenant.ReceiveLimit",
"label": "Receive Limit in MB (Default is 36)"
"label": "Receive Limit in MB (Default is 36)",
"default": 36
}
],
"label": "Set send/receive size limits",
Expand Down
277 changes: 139 additions & 138 deletions src/importsMap.jsx

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,12 @@
"component": "views/email-exchange/administration/QuarantineList",
"allowedRoles": ["admin", "editor", "readonly"]
},
{
"name": "List Tenant Allow/Block Lists",
"path": "/email/administration/tenant-allow-block-lists",
"component": "views/email-exchange/administration/ListTenantAllowBlockList",
"allowedRoles": ["admin", "editor", "readonly"]
},
{
"name": "Email Reports",
"path": "/email/reports",
Expand Down
2 changes: 1 addition & 1 deletion src/views/cipp/app-settings/SettingsExtensionMappings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ export function SettingsExtensionMappings() {
initialValues={listBackendNinjaFieldsResult.data?.Mappings}
render={({ handleSubmit, submitting, values }) => {
return (
<CForm id="NinjaFields" onSubmit={handleSubmit}>
<CForm id="ninjaFields" onSubmit={handleSubmit}>
<CCardText>
<h5>Organization Global Custom Field Mapping</h5>
<p>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import React from 'react'
import { useSelector } from 'react-redux'
import { CButton } from '@coreui/react'
import { faEdit } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { Link } from 'react-router-dom'
import { CippPageList } from 'src/components/layout'
import { CellTip } from 'src/components/tables'

const AllowBlockList = () => {
const tenant = useSelector((state) => state.app.currentTenant)
const Actions = (row, rowIndex, formatExtraData) => (
<>
<Link
to={`/email/administration/edit-tenant-allow-block-lists?tenantDomain=${tenant.defaultDomainName}?Entry=${row.value}?ListType=${row.ListType}`}
>
<CButton size="sm" variant="ghost" color="warning">
<FontAwesomeIcon icon={faEdit} />
</CButton>
</Link>
<Link
to={`/email/administration/delete-tenant-allow-block-lists?tenantDomain=${tenant.defaultDomainName}?Entry=${row.value}?ListType=${row.ListType}`}
>
<CButton size="sm" variant="ghost" color="danger">
<FontAwesomeIcon icon={'trash'} />
</CButton>
</Link>
</>
)

const columns = [
{
name: 'Value',
selector: (row) => row['Value'],
sortable: true,
cell: (row) => CellTip(row['Value']),
exportSelector: 'Value',
},
{
name: 'ListType',
selector: (row) => row['ListType'],
sortable: true,
cell: (row) => CellTip(row['ListType']),
exportSelector: 'ListType',
maxWidth: '80px',
},
{
name: 'Action',
selector: (row) => row['Action'],
sortable: true,
cell: (row) => CellTip(row['Action']),
exportSelector: 'Action',
maxWidth: '80px',
},
{
name: 'Notes',
selector: (row) => row['Notes'],
sortable: true,
cell: (row) => CellTip(row['Notes']),
exportSelector: 'Notes',
},
{
name: 'LastModifiedDateTime',
selector: (row) => row['LastModifiedDateTime'],
sortable: true,
cell: (row) => CellTip(row['LastModifiedDateTime']),
exportSelector: 'LastModifiedDateTime',
},
{
name: 'ExpirationDate',
selector: (row) => row['ExpirationDate'],
sortable: true,
cell: (row) => CellTip(row['ExpirationDate']),
exportSelector: 'ExpirationDate',
},
// {
// name: 'Actions',
// cell: Actions,
// maxWidth: '80px',
// },
]

return (
<CippPageList
title="Tenant Allow/Block Lists"
datatable={{
columns,
path: '/api/ListTenantAllowBlockList',
reportName: `${tenant?.defaultDomainName}-TenantAllowBlockList`,
params: { TenantFilter: tenant?.defaultDomainName },
}}
/>
)
}

export default AllowBlockList
2 changes: 1 addition & 1 deletion src/views/home/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ const TenantDashboard = () => {
'No SharePoint Information available'}
{sharepoint && !isFetchingSPQuota && sharepoint.GeoUsedStorageMB && (
<CChart
type="doughnut"
type="pie"
data={{
labels: ['Used', 'Free'],
datasets: [
Expand Down
1 change: 1 addition & 0 deletions src/views/tenant/standards/ListAppliedStandards.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,7 @@ const ApplyNewStandard = () => {
className="mb-3"
name={component.name}
label={component.label}
defaultValue={component.default}
/>
)}
{component.type === 'boolean' && (
Expand Down
2 changes: 1 addition & 1 deletion version_latest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.6.0
5.6.1