Skip to content

Change actions from GET to POST #3660

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 24 commits into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
81f3057
Change to POST
kris6673 Feb 17, 2025
d683c91
Change to POST
kris6673 Feb 17, 2025
f9ea548
Change mailbox conversion actions from GET to POST and update API end…
kris6673 Feb 17, 2025
4843840
Change to POST
kris6673 Feb 17, 2025
a74d9b1
Change restore action type from GET to POST
kris6673 Feb 17, 2025
174b37f
Change spam filter actions from GET to POST
kris6673 Feb 17, 2025
bdbe851
Change remove mailbox rule action type from GET to POST
kris6673 Feb 17, 2025
892004c
Change Send MFA Push action type from GET to POST
kris6673 Feb 17, 2025
2789f7b
Change Enable Online Archive action type from GET to POST
kris6673 Feb 17, 2025
656809e
Change Block Sign In action type from GET to POST
kris6673 Feb 17, 2025
bebccd1
Change Reset Password action type from GET to POST
kris6673 Feb 17, 2025
3c9c4c0
Change Revoke all user sessions action type from GET to POST
kris6673 Feb 17, 2025
d836a27
Change Delete User action type from GET to POST
kris6673 Feb 17, 2025
5169104
Change Delete policy action type from GET to POST
kris6673 Feb 19, 2025
f4e81b7
GET to POST
kris6673 Feb 20, 2025
59256bf
Remove useless more info and remove option to add own input to autoCo…
kris6673 Feb 21, 2025
9bf7ac1
Fix wrong property name
kris6673 Feb 22, 2025
9038ee6
Change action types from GET to POST for mailbox and group management…
kris6673 Feb 23, 2025
d10a2d1
Fix wrong endpoint used for deleting rooms and mailboxes
kris6673 Feb 23, 2025
9f58152
Change action types from GET to POST for Copy Sent Items operations
kris6673 Feb 23, 2025
4492e55
GET to POST
kris6673 Feb 23, 2025
7e89f0f
Change action types from GET to POST for antiphishing, malware, safe …
kris6673 Feb 23, 2025
230622b
Change action types from GET to POST for compliance policies and temp…
kris6673 Feb 23, 2025
df1475b
Change action types from GET to POST for various user and policy oper…
kris6673 Feb 23, 2025
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
30 changes: 15 additions & 15 deletions src/components/CippComponents/CippUserActions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const CippUserActions = () => {
//tested

label: "Create Temporary Access Password",
type: "GET",
type: "POST",
icon: <Password />,
url: "/api/ExecCreateTAP",
data: { ID: "userPrincipalName" },
Expand All @@ -63,7 +63,7 @@ export const CippUserActions = () => {
{
//tested
label: "Re-require MFA registration",
type: "GET",
type: "POST",
icon: <PhonelinkSetup />,
url: "/api/ExecResetMFA",
data: { ID: "userPrincipalName" },
Expand Down Expand Up @@ -107,26 +107,26 @@ export const CippUserActions = () => {
{
//tested
label: "Convert to Shared Mailbox",
type: "GET",
type: "POST",
icon: <Email />,
url: "/api/ExecConvertToSharedMailbox",
data: { ID: "userPrincipalName" },
url: "/api/ExecConvertMailbox",
data: { ID: "userPrincipalName", MailboxType: "!Shared" },
confirmText: "Are you sure you want to convert this user to a shared mailbox?",
multiPost: false,
},
{
label: "Convert to User Mailbox",
type: "GET",
type: "POST",
icon: <Email />,
url: "/api/ExecConvertToSharedMailbox",
data: { ID: "userPrincipalName", ConvertToUser: true },
url: "/api/ExecConvertMailbox",
data: { ID: "userPrincipalName", MailboxType: "!Regular" },
confirmText: "Are you sure you want to convert this user to a user mailbox?",
multiPost: false,
},
{
//tested
label: "Enable Online Archive",
type: "GET",
type: "POST",
icon: <Archive />,
url: "/api/ExecEnableArchive",
data: { ID: "userPrincipalName" },
Expand Down Expand Up @@ -237,7 +237,7 @@ export const CippUserActions = () => {
},
{
label: "Block Sign In",
type: "GET",
type: "POST",
icon: <Block />,
url: "/api/ExecDisableUser",
data: { ID: "id" },
Expand All @@ -247,7 +247,7 @@ export const CippUserActions = () => {
},
{
label: "Unblock Sign In",
type: "GET",
type: "POST",
icon: <LockOpen />,
url: "/api/ExecDisableUser",
data: { ID: "id", Enable: true },
Expand All @@ -257,7 +257,7 @@ export const CippUserActions = () => {
},
{
label: "Reset Password (Must Change)",
type: "GET",
type: "POST",
icon: <LockReset />,
url: "/api/ExecResetPass",
data: {
Expand All @@ -271,7 +271,7 @@ export const CippUserActions = () => {
},
{
label: "Reset Password",
type: "GET",
type: "POST",
icon: <LockReset />,
url: "/api/ExecResetPass",
data: {
Expand All @@ -296,7 +296,7 @@ export const CippUserActions = () => {
},
{
label: "Revoke all user sessions",
type: "GET",
type: "POST",
icon: <PersonOff />,
url: "/api/ExecRevokeSessions",
data: { ID: "id", Username: "userPrincipalName" },
Expand All @@ -305,7 +305,7 @@ export const CippUserActions = () => {
},
{
label: "Delete User",
type: "GET",
type: "POST",
icon: <TrashIcon />,
url: "/api/RemoveUser",
data: { ID: "id" },
Expand Down
2 changes: 1 addition & 1 deletion src/pages/email/administration/contacts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const Page = () => {
},
{
label: "Remove Contact",
type: "GET",
type: "POST",
url: "/api/RemoveContact",
data: {
GUID: "id",
Expand Down
2 changes: 1 addition & 1 deletion src/pages/email/administration/mailbox-rules/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Page = () => {
const actions = [
{
label: "Remove Mailbox Rule",
type: "GET",
type: "POST",
icon: <TrashIcon />,
url: "/api/ExecRemoveMailboxRule",
data: { ruleId: "Identity", userPrincipalName: "UserPrincipalName", ruleName: "Name" },
Expand Down
48 changes: 25 additions & 23 deletions src/pages/email/administration/mailboxes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import Link from "next/link";
import { Button } from "@mui/material";
import { Add } from "@mui/icons-material";
import { Add, Mail } from "@mui/icons-material";

import {
Archive,
Expand Down Expand Up @@ -35,7 +35,7 @@ const Page = () => {
},
{
label: "Send MFA Push",
type: "GET",
type: "POST",
url: "/api/ExecSendPush",
data: {
UserEmail: "UPN",
Expand All @@ -44,43 +44,45 @@ const Page = () => {
icon: <PhonelinkLock />,
},
{
label: "Convert to Shared Mailbox",
type: "GET",
icon: <MailOutline />,
url: "/api/ExecConvertToSharedMailbox",
label: "Convert to User Mailbox",
type: "POST",
url: "/api/ExecConvertMailbox",
icon: <Person />,
data: {
ID: "UPN",
MailboxType: "!Regular",
},
confirmText: "Are you sure you want to convert this mailbox to a shared mailbox?",
condition: (row) => row.recipientTypeDetails !== "SharedMailbox",
confirmText: "Are you sure you want to convert this mailbox to a user mailbox?",
condition: (row) => row.recipientTypeDetails !== "UserMailbox",
},
{
label: "Convert to User Mailbox",
type: "GET",
url: "/api/ExecConvertToSharedMailbox",
icon: <Person />,
label: "Convert to Shared Mailbox",
type: "POST",
icon: <MailOutline />,
url: "/api/ExecConvertMailbox",
data: {
ID: "UPN",
ConvertToUser: true,
MailboxType: "!Shared",
},
confirmText: "Are you sure you want to convert this mailbox to a user mailbox?",
condition: (row) => row.recipientTypeDetails !== "UserMailbox",
confirmText: "Are you sure you want to convert this mailbox to a shared mailbox?",
condition: (row) => row.recipientTypeDetails !== "SharedMailbox",
},
{
label: "Convert to Room Mailbox",
type: "GET",
url: "/api/ExecConvertToRoomMailbox",
type: "POST",
url: "/api/ExecConvertMailbox",
icon: <Room />,
data: {
ID: "UPN",
MailboxType: "!Room",
},
confirmText: "Are you sure you want to convert this mailbox to a room mailbox?",
condition: (row) => row.recipientTypeDetails !== "RoomMailbox",
},
{
//tested
label: "Enable Online Archive",
type: "GET",
type: "POST",
icon: <Archive />,
url: "/api/ExecEnableArchive",
data: { ID: "UPN" },
Expand Down Expand Up @@ -115,7 +117,7 @@ const Page = () => {
},
{
label: "Start Managed Folder Assistant",
type: "GET",
type: "POST",
url: "/api/ExecStartManagedFolderAssistant",
icon: <PlayCircleIcon />,
data: {
Expand All @@ -125,16 +127,16 @@ const Page = () => {
},
{
label: "Delete Mailbox",
type: "GET",
type: "POST",
icon: <TrashIcon />, // Added
url: "/api/RemoveMailbox",
url: "/api/RemoveUser",
data: { ID: "UPN" },
confirmText: "Are you sure you want to delete this mailbox?",
multiPost: false,
},
{
label: "Copy Sent Items to Shared Mailbox",
type: "GET",
type: "POST",
url: "/api/ExecCopyForSent",
data: { ID: "UPN" },
confirmText: "Are you sure you want to enable Copy Sent Items to Shared Mailbox?",
Expand All @@ -144,7 +146,7 @@ const Page = () => {
},
{
label: "Disable Copy Sent Items to Shared Mailbox",
type: "GET",
type: "POST",
url: "/api/ExecCopyForSent",
data: { ID: "UPN", MessageCopyForSentAsEnabled: false },
confirmText: "Are you sure you want to disable Copy Sent Items to Shared Mailbox?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const AddTenantAllowBlockList = () => {
name="listType"
formControl={formControl}
multiple={false}
creatable={false}
options={[
{ label: "Sender", value: "Sender" },
{ label: "Url", value: "Url" },
Expand All @@ -82,6 +83,7 @@ const AddTenantAllowBlockList = () => {
name="listMethod"
formControl={formControl}
multiple={false}
creatable={false}
options={[
{ label: "Block", value: "Block" },
{ label: "Allow", value: "Allow" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,18 @@ const Page = () => {
Entries: "Value",
ListType: "ListType",
},
confirmText: "Are you sure you want to delete?",
confirmText: "Are you sure you want to delete this entry?",
color: "danger",
icon: <TrashIcon />,
},
];

const offCanvas = {
extendedInfoFields: ["Value", "Notes", "ExpirationDate"],
actions: actions,
};

const simpleColumns = [
"Value",
"ListType",
"Action",
"Notes",
"LastUsedDate",
"LastModifiedDateTime",
"ExpirationDate",
];
Expand All @@ -42,7 +38,6 @@ const Page = () => {
title={pageTitle}
apiUrl="/api/ListTenantAllowBlockList"
actions={actions}
offCanvas={offCanvas}
simpleColumns={simpleColumns}
titleButton={{
label: "Add",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Page = () => {
actions={[
{
label: "Block Sign In",
type: "GET",
type: "POST",
icon: <Block />,
url: "/api/ExecDisableUser",
data: { ID: "id" },
Expand Down
8 changes: 4 additions & 4 deletions src/pages/email/reports/antiphishing-filters/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ const Page = () => {
const actions = [
{
label: "Enable Rule",
type: "GET",
type: "POST",
icon: <Check />,
url: "/api/EditAntiPhishingFilter",
data: {
State: "Enable",
State: "!Enable",
RuleName: "RuleName",
},
confirmText: "Are you sure you want to enable this rule?",
condition: (row) => row.State === "Disabled",
},
{
label: "Disable Rule",
type: "GET",
type: "POST",
icon: <Block />,
url: "/api/EditAntiPhishingFilter",
data: {
State: "Disable",
State: "!Disable",
RuleName: "RuleName",
},
confirmText: "Are you sure you want to disable this rule?",
Expand Down
8 changes: 4 additions & 4 deletions src/pages/email/reports/malware-filters/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ const Page = () => {
actions={[
{
label: "Enable Rule",
type: "GET",
type: "POST",
icon: <Check />,
url: "/api/EditMalwareFilter",
data: {
State: "Enable",
State: "!Enable",
RuleName: "RuleName",
},
confirmText: "Are you sure you want to enable this rule?",
condition: (row) => row.State === "Disabled",
},
{
label: "Disable Rule",
type: "GET",
type: "POST",
icon: <Block />,
url: "/api/EditMalwareFilter",
data: {
State: "Disable",
State: "!Disable",
RuleName: "RuleName",
},
confirmText: "Are you sure you want to disable this rule?",
Expand Down
6 changes: 3 additions & 3 deletions src/pages/email/reports/safeattachments-filters/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Page = () => {
const actions = [
{
label: "Enable Rule",
type: "GET",
type: "POST",
icon: <Check />,
url: "/api/EditSafeAttachmentsFilter",
data: {
Expand All @@ -19,11 +19,11 @@ const Page = () => {
},
confirmText: "Are you sure you want to enable this rule?",
color: "info",
condition: (row) => row.State === "Disabled"
condition: (row) => row.State === "Disabled",
},
{
label: "Disable Rule",
type: "GET",
type: "POST",
icon: <Block />,
url: "/api/EditSafeAttachmentsFilter",
data: {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/email/reports/safelinks-filters/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const Page = () => {
const actions = [
{
label: "Enable Rule",
type: "GET",
type: "POST",
icon: <Check />,
url: "/api/EditSafeLinksFilter",
data: {
Expand All @@ -27,7 +27,7 @@ const Page = () => {
},
{
label: "Disable Rule",
type: "GET",
type: "POST",
icon: <Block />,
url: "/api/EditSafeLinksFilter",
data: {
Expand Down
Loading
Loading