Skip to content

Commit

Permalink
Merge pull request #6 from KelvinTegelaar/dev
Browse files Browse the repository at this point in the history
[pull] dev from KelvinTegelaar:dev
  • Loading branch information
markheydon authored Jan 31, 2025
2 parents f320f55 + 1ea3338 commit fff7975
Show file tree
Hide file tree
Showing 24 changed files with 245 additions and 129 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"license": "AGPL-3.0",
"engines": {
"node": "^20.18.2"
"node": "^20.18.1"
},
"repository": {
"type": "git",
Expand Down
Binary file added public/assets/integrations/github.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/integrations/github_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion src/components/CippComponents/CippApiDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ export const CippApiDialog = (props) => {
} else {
Object.keys(dataObject).forEach((key) => {
const value = dataObject[key];

if (typeof value === "string" && value.startsWith("!")) {
newData[key] = value.slice(1);
} else if (typeof value === "string") {
Expand Down
1 change: 1 addition & 0 deletions src/pages/cipp/logs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ const Page = () => {
apiUrl={apiUrl}
simpleColumns={simpleColumns}
queryKey={`Listlogs-${dateFilter}-${filterEnabled}`}
tenantInTitle={false}
apiData={{
DateFilter: dateFilter, // Pass date filter from state
Filter: filterEnabled, // Pass filter toggle state
Expand Down
8 changes: 5 additions & 3 deletions src/pages/email/administration/contacts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,31 @@ import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx"
import { Edit } from "@mui/icons-material";
import { Button } from "@mui/material";
import Link from "next/link";
import TrashIcon from '@heroicons/react/24/outline/TrashIcon';

const Page = () => {
const pageTitle = "Contacts";

const actions = [
{
label: "Remove Contact",
type: "POST",
type: "GET",
url: "/api/RemoveContact",
data: {
TenantFilter: "Tenant",
GUID: "id",
},
confirmText: "Are you sure you want to delete this contact?",
color: "danger",
icon: <TrashIcon />,
},
/* TODO: Implement edit contact
{
label: "Edit Contact",
link: "/email/administration/edit-contact/[id]",
multiPost: false,
icon: <Edit />,
color: "warning",
},
},*/
];

const simpleColumns = ["displayName", "mail", "companyName", "onPremisesSyncEnabled"];
Expand Down
87 changes: 87 additions & 0 deletions src/pages/email/administration/mailboxes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,93 @@ const Page = () => {
confirmText: "Are you sure you want to delete this mailbox?",
multiPost: false,
},
{
label: "Copy Sent Items to Shared Mailbox",
type: "GET",
url: "/api/ExecCopyForSent",
data: { ID: "UPN" },
confirmText: "Are you sure you want to enable Copy Sent Items to Shared Mailbox?",
icon: <MailOutline />,
condition: (row) =>
row.MessageCopyForSentAsEnabled === false && row.recipientTypeDetails === "SharedMailbox",
},
{
label: "Disable Copy Sent Items to Shared Mailbox",
type: "GET",
url: "/api/ExecCopyForSent",
data: { ID: "UPN", MessageCopyForSentAsEnabled: false },
confirmText: "Are you sure you want to disable Copy Sent Items to Shared Mailbox?",
icon: <MailOutline />,
condition: (row) =>
row.MessageCopyForSentAsEnabled === true && row.recipientTypeDetails === "SharedMailbox",
},
{
label: "Set mailbox locale",
type: "POST",
url: "/api/ExecSetMailboxLocale",
data: { user: "UPN", ProhibitSendQuota: true },
confirmText: "Enter a locale, e.g. en-US",
icon: <MailOutline />,
fields: [
{
label: "Locale",
name: "locale",
type: "textField",
placeholder: "e.g. en-US",
},
],
},
{
label: "Set Send Quota",
type: "POST",
url: "/api/ExecSetMailboxQuota",
data: { user: "UPN", ProhibitSendQuota: true },
confirmText: "Enter a quota. e.g. 1000MB, 10GB,1TB",
icon: <MailOutline />,
fields: [
{
label: "Quota",
name: "quota",
type: "textField",
placeholder: "e.g. 1000MB, 10GB,1TB",
},
],
},
{
label: "Set Send and Receive Quota",
type: "POST",
url: "/api/ExecSetMailboxQuota",
data: {
user: "UPN",
ProhibitSendReceiveQuota: true,
},
confirmText: "Enter a quota. e.g. 1000MB, 10GB,1TB",
icon: <MailOutline />,
fields: [
{
label: "Quota",
name: "quota",
type: "textField",
placeholder: "e.g. 1000MB, 10GB,1TB",
},
],
},
{
label: "Set Quota Warning Level",
type: "POST",
url: "/api/ExecSetMailboxQuota",
data: { user: "UPN", IssueWarningQuota: true },
confirmText: "Enter a quota. e.g. 1000MB, 10GB,1TB",
icon: <MailOutline />,
fields: [
{
label: "Quota",
name: "quota",
type: "textField",
placeholder: "e.g. 1000MB, 10GB,1TB",
},
],
},
];

// Define off-canvas details
Expand Down
3 changes: 3 additions & 0 deletions src/pages/email/administration/quarantine/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ const Page = () => {
},
confirmText: "Are you sure you want to release this message?",
icon: <Done />,
condition: (row) => row.ReleaseStatus !== "RELEASED",
},
{
label: "Deny",
Expand All @@ -112,6 +113,7 @@ const Page = () => {
},
confirmText: "Are you sure you want to deny this message?",
icon: <Block />,
condition: (row) => row.ReleaseStatus !== "DENIED",
},
{
label: "Release & Allow Sender",
Expand All @@ -125,6 +127,7 @@ const Page = () => {
confirmText:
"Are you sure you want to release this email and add the sender to the whitelist?",
icon: <DoneAll />,
condition: (row) => row.ReleaseStatus !== "RELEASED",
},
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { Button } from "@mui/material";
import Link from "next/link";
import TrashIcon from '@heroicons/react/24/outline/TrashIcon';

const Page = () => {
const pageTitle = "Tenant Allow/Block Lists";
Expand All @@ -12,12 +13,12 @@ const Page = () => {
type: "POST",
url: "/api/RemoveTenantAllowBlockList",
data: {
TenantFilter: "Tenant",
Entries: "Value",
ListType: "ListType",
},
confirmText: "Are you sure you want to delete?",
color: "danger",
icon: <TrashIcon />,
},
];

Expand Down
8 changes: 5 additions & 3 deletions src/pages/email/reports/SharedMailboxEnabledAccount/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { Block } from "@mui/icons-material";

/*
NOTE for Devs:
Expand All @@ -18,10 +19,11 @@ const Page = () => {
actions={[
{
label: "Block Sign In",
type: "POST",
type: "GET",
icon: <Block />,
url: "/api/ExecDisableUser",
data: { TenantFilter: "Tenant", ID: "id" },
confirmText: "Are you sure you want to block this user from signing in?",
data: { ID: "id" },
confirmText: "Are you sure you want to block the sign-in for this user?",
},
]}
offCanvas={{
Expand Down
18 changes: 10 additions & 8 deletions src/pages/email/reports/antiphishing-filters/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { Block, Check } from "@mui/icons-material";

const Page = () => {
const pageTitle = "List of Anti-Phishing Filters";
Expand All @@ -8,25 +9,27 @@ const Page = () => {
const actions = [
{
label: "Enable Rule",
type: "POST",
type: "GET",
icon: <Check />,
url: "/api/EditAntiPhishingFilter",
data: {
State: "Enable",
TenantFilter: "TenantFilter", // TenantFilter used in API path as per original file
RuleName: "id",
RuleName: "RuleName",
},
confirmText: "Are you sure you want to enable this rule?",
condition: (row) => row.State === "Disabled",
},
{
label: "Disable Rule",
type: "POST",
type: "GET",
icon: <Block />,
url: "/api/EditAntiPhishingFilter",
data: {
State: "Disable",
TenantFilter: "TenantFilter",
RuleName: "id",
RuleName: "RuleName",
},
confirmText: "Are you sure you want to disable this rule?",
condition: (row) => row.State === "Enabled",
},
// Uncomment the following block if Delete Rule is to be re-enabled in the future
/*
Expand All @@ -35,8 +38,7 @@ const Page = () => {
type: "POST",
url: "/api/RemoveAntiPhishingFilter",
data: {
TenantFilter: "TenantFilter",
RuleName: "id",
RuleName: "RuleName",
},
confirmText: "Are you sure you want to delete this rule?",
},
Expand Down
5 changes: 5 additions & 0 deletions src/pages/email/reports/global-address-list/index.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { Visibility, VisibilityOff } from "@mui/icons-material";

const Page = () => {
const actions = [
{
label: "Unhide from Global Address List",
type: "POST",
url: "/api/ExecHideFromGAL",
icon: <Visibility />,
data: {
HideFromGAL: false,
ID: "PrimarySmtpAddress",
},
confirmText: "Are you sure you want to show this mailbox in the Global Address List?",
condition: (row) => row.HiddenFromAddressListsEnabled == true,
},
{
label: "Hide from Global Address List",
type: "POST",
url: "/api/ExecHideFromGAL",
icon: <VisibilityOff />,
data: {
HideFromGAL: true,
ID: "PrimarySmtpAddress",
},
confirmText: "Are you sure you want to hide this mailbox from the Global Address List?",
condition: (row) => row.HiddenFromAddressListsEnabled == false,
},
];

Expand Down
18 changes: 10 additions & 8 deletions src/pages/email/reports/malware-filters/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { Block, Check } from "@mui/icons-material";

const Page = () => {
return (
Expand All @@ -9,34 +10,35 @@ const Page = () => {
actions={[
{
label: "Enable Rule",
type: "POST",
type: "GET",
icon: <Check />,
url: "/api/EditMalwareFilter",
data: {
State: "Enable",
TenantFilter: "tenant.defaultDomainName",
RuleName: "row.RuleName",
RuleName: "RuleName",
},
confirmText: "Are you sure you want to enable this rule?",
condition: (row) => row.State === "Disabled",
},
{
label: "Disable Rule",
type: "POST",
type: "GET",
icon: <Block />,
url: "/api/EditMalwareFilter",
data: {
State: "Disable",
TenantFilter: "tenant.defaultDomainName",
RuleName: "row.RuleName",
RuleName: "RuleName",
},
confirmText: "Are you sure you want to disable this rule?",
condition: (row) => row.State === "Enabled",
},
/* Uncomment and add additional actions if required by future specs
{
label: "Delete Rule",
type: "POST",
url: "/api/RemoveMalwareFilter",
data: {
TenantFilter: "tenant.defaultDomainName",
RuleName: "row.RuleName",
RuleName: "RuleName",
},
confirmText: "Are you sure you want to delete this rule?",
},
Expand Down
Loading

0 comments on commit fff7975

Please sign in to comment.