Skip to content

Commit 221ee8d

Browse files
authored
Merge pull request #3660 from kris6673/endpoints
Change actions from GET to POST
2 parents c63c6a4 + df1475b commit 221ee8d

File tree

29 files changed

+121
-114
lines changed

29 files changed

+121
-114
lines changed

src/components/CippComponents/CippUserActions.jsx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const CippUserActions = () => {
5353
//tested
5454

5555
label: "Create Temporary Access Password",
56-
type: "GET",
56+
type: "POST",
5757
icon: <Password />,
5858
url: "/api/ExecCreateTAP",
5959
data: { ID: "userPrincipalName" },
@@ -63,7 +63,7 @@ export const CippUserActions = () => {
6363
{
6464
//tested
6565
label: "Re-require MFA registration",
66-
type: "GET",
66+
type: "POST",
6767
icon: <PhonelinkSetup />,
6868
url: "/api/ExecResetMFA",
6969
data: { ID: "userPrincipalName" },
@@ -107,26 +107,26 @@ export const CippUserActions = () => {
107107
{
108108
//tested
109109
label: "Convert to Shared Mailbox",
110-
type: "GET",
110+
type: "POST",
111111
icon: <Email />,
112-
url: "/api/ExecConvertToSharedMailbox",
113-
data: { ID: "userPrincipalName" },
112+
url: "/api/ExecConvertMailbox",
113+
data: { ID: "userPrincipalName", MailboxType: "!Shared" },
114114
confirmText: "Are you sure you want to convert this user to a shared mailbox?",
115115
multiPost: false,
116116
},
117117
{
118118
label: "Convert to User Mailbox",
119-
type: "GET",
119+
type: "POST",
120120
icon: <Email />,
121-
url: "/api/ExecConvertToSharedMailbox",
122-
data: { ID: "userPrincipalName", ConvertToUser: true },
121+
url: "/api/ExecConvertMailbox",
122+
data: { ID: "userPrincipalName", MailboxType: "!Regular" },
123123
confirmText: "Are you sure you want to convert this user to a user mailbox?",
124124
multiPost: false,
125125
},
126126
{
127127
//tested
128128
label: "Enable Online Archive",
129-
type: "GET",
129+
type: "POST",
130130
icon: <Archive />,
131131
url: "/api/ExecEnableArchive",
132132
data: { ID: "userPrincipalName" },
@@ -237,7 +237,7 @@ export const CippUserActions = () => {
237237
},
238238
{
239239
label: "Block Sign In",
240-
type: "GET",
240+
type: "POST",
241241
icon: <Block />,
242242
url: "/api/ExecDisableUser",
243243
data: { ID: "id" },
@@ -247,7 +247,7 @@ export const CippUserActions = () => {
247247
},
248248
{
249249
label: "Unblock Sign In",
250-
type: "GET",
250+
type: "POST",
251251
icon: <LockOpen />,
252252
url: "/api/ExecDisableUser",
253253
data: { ID: "id", Enable: true },
@@ -257,7 +257,7 @@ export const CippUserActions = () => {
257257
},
258258
{
259259
label: "Reset Password (Must Change)",
260-
type: "GET",
260+
type: "POST",
261261
icon: <LockReset />,
262262
url: "/api/ExecResetPass",
263263
data: {
@@ -271,7 +271,7 @@ export const CippUserActions = () => {
271271
},
272272
{
273273
label: "Reset Password",
274-
type: "GET",
274+
type: "POST",
275275
icon: <LockReset />,
276276
url: "/api/ExecResetPass",
277277
data: {
@@ -296,7 +296,7 @@ export const CippUserActions = () => {
296296
},
297297
{
298298
label: "Revoke all user sessions",
299-
type: "GET",
299+
type: "POST",
300300
icon: <PersonOff />,
301301
url: "/api/ExecRevokeSessions",
302302
data: { ID: "id", Username: "userPrincipalName" },
@@ -305,7 +305,7 @@ export const CippUserActions = () => {
305305
},
306306
{
307307
label: "Delete User",
308-
type: "GET",
308+
type: "POST",
309309
icon: <TrashIcon />,
310310
url: "/api/RemoveUser",
311311
data: { ID: "id" },

src/pages/email/administration/contacts/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const Page = () => {
2020
},
2121
{
2222
label: "Remove Contact",
23-
type: "GET",
23+
type: "POST",
2424
url: "/api/RemoveContact",
2525
data: {
2626
GUID: "id",

src/pages/email/administration/mailbox-rules/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const Page = () => {
1010
const actions = [
1111
{
1212
label: "Remove Mailbox Rule",
13-
type: "GET",
13+
type: "POST",
1414
icon: <TrashIcon />,
1515
url: "/api/ExecRemoveMailboxRule",
1616
data: { ruleId: "Identity", userPrincipalName: "UserPrincipalName", ruleName: "Name" },

src/pages/email/administration/mailboxes/index.js

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Layout as DashboardLayout } from "/src/layouts/index.js";
22
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
33
import Link from "next/link";
44
import { Button } from "@mui/material";
5-
import { Add } from "@mui/icons-material";
5+
import { Add, Mail } from "@mui/icons-material";
66

77
import {
88
Archive,
@@ -35,7 +35,7 @@ const Page = () => {
3535
},
3636
{
3737
label: "Send MFA Push",
38-
type: "GET",
38+
type: "POST",
3939
url: "/api/ExecSendPush",
4040
data: {
4141
UserEmail: "UPN",
@@ -44,43 +44,45 @@ const Page = () => {
4444
icon: <PhonelinkLock />,
4545
},
4646
{
47-
label: "Convert to Shared Mailbox",
48-
type: "GET",
49-
icon: <MailOutline />,
50-
url: "/api/ExecConvertToSharedMailbox",
47+
label: "Convert to User Mailbox",
48+
type: "POST",
49+
url: "/api/ExecConvertMailbox",
50+
icon: <Person />,
5151
data: {
5252
ID: "UPN",
53+
MailboxType: "!Regular",
5354
},
54-
confirmText: "Are you sure you want to convert this mailbox to a shared mailbox?",
55-
condition: (row) => row.recipientTypeDetails !== "SharedMailbox",
55+
confirmText: "Are you sure you want to convert this mailbox to a user mailbox?",
56+
condition: (row) => row.recipientTypeDetails !== "UserMailbox",
5657
},
5758
{
58-
label: "Convert to User Mailbox",
59-
type: "GET",
60-
url: "/api/ExecConvertToSharedMailbox",
61-
icon: <Person />,
59+
label: "Convert to Shared Mailbox",
60+
type: "POST",
61+
icon: <MailOutline />,
62+
url: "/api/ExecConvertMailbox",
6263
data: {
6364
ID: "UPN",
64-
ConvertToUser: true,
65+
MailboxType: "!Shared",
6566
},
66-
confirmText: "Are you sure you want to convert this mailbox to a user mailbox?",
67-
condition: (row) => row.recipientTypeDetails !== "UserMailbox",
67+
confirmText: "Are you sure you want to convert this mailbox to a shared mailbox?",
68+
condition: (row) => row.recipientTypeDetails !== "SharedMailbox",
6869
},
6970
{
7071
label: "Convert to Room Mailbox",
71-
type: "GET",
72-
url: "/api/ExecConvertToRoomMailbox",
72+
type: "POST",
73+
url: "/api/ExecConvertMailbox",
7374
icon: <Room />,
7475
data: {
7576
ID: "UPN",
77+
MailboxType: "!Room",
7678
},
7779
confirmText: "Are you sure you want to convert this mailbox to a room mailbox?",
7880
condition: (row) => row.recipientTypeDetails !== "RoomMailbox",
7981
},
8082
{
8183
//tested
8284
label: "Enable Online Archive",
83-
type: "GET",
85+
type: "POST",
8486
icon: <Archive />,
8587
url: "/api/ExecEnableArchive",
8688
data: { ID: "UPN" },
@@ -115,7 +117,7 @@ const Page = () => {
115117
},
116118
{
117119
label: "Start Managed Folder Assistant",
118-
type: "GET",
120+
type: "POST",
119121
url: "/api/ExecStartManagedFolderAssistant",
120122
icon: <PlayCircleIcon />,
121123
data: {
@@ -125,16 +127,16 @@ const Page = () => {
125127
},
126128
{
127129
label: "Delete Mailbox",
128-
type: "GET",
130+
type: "POST",
129131
icon: <TrashIcon />, // Added
130-
url: "/api/RemoveMailbox",
132+
url: "/api/RemoveUser",
131133
data: { ID: "UPN" },
132134
confirmText: "Are you sure you want to delete this mailbox?",
133135
multiPost: false,
134136
},
135137
{
136138
label: "Copy Sent Items to Shared Mailbox",
137-
type: "GET",
139+
type: "POST",
138140
url: "/api/ExecCopyForSent",
139141
data: { ID: "UPN" },
140142
confirmText: "Are you sure you want to enable Copy Sent Items to Shared Mailbox?",
@@ -144,7 +146,7 @@ const Page = () => {
144146
},
145147
{
146148
label: "Disable Copy Sent Items to Shared Mailbox",
147-
type: "GET",
149+
type: "POST",
148150
url: "/api/ExecCopyForSent",
149151
data: { ID: "UPN", MessageCopyForSentAsEnabled: false },
150152
confirmText: "Are you sure you want to disable Copy Sent Items to Shared Mailbox?",

src/pages/email/administration/tenant-allow-block-lists/add.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ const AddTenantAllowBlockList = () => {
6565
name="listType"
6666
formControl={formControl}
6767
multiple={false}
68+
creatable={false}
6869
options={[
6970
{ label: "Sender", value: "Sender" },
7071
{ label: "Url", value: "Url" },
@@ -82,6 +83,7 @@ const AddTenantAllowBlockList = () => {
8283
name="listMethod"
8384
formControl={formControl}
8485
multiple={false}
86+
creatable={false}
8587
options={[
8688
{ label: "Block", value: "Block" },
8789
{ label: "Allow", value: "Allow" },

src/pages/email/administration/tenant-allow-block-lists/index.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,18 @@ const Page = () => {
1717
Entries: "Value",
1818
ListType: "ListType",
1919
},
20-
confirmText: "Are you sure you want to delete?",
20+
confirmText: "Are you sure you want to delete this entry?",
2121
color: "danger",
2222
icon: <TrashIcon />,
2323
},
2424
];
2525

26-
const offCanvas = {
27-
extendedInfoFields: ["Value", "Notes", "ExpirationDate"],
28-
actions: actions,
29-
};
30-
3126
const simpleColumns = [
3227
"Value",
3328
"ListType",
3429
"Action",
3530
"Notes",
31+
"LastUsedDate",
3632
"LastModifiedDateTime",
3733
"ExpirationDate",
3834
];
@@ -42,7 +38,6 @@ const Page = () => {
4238
title={pageTitle}
4339
apiUrl="/api/ListTenantAllowBlockList"
4440
actions={actions}
45-
offCanvas={offCanvas}
4641
simpleColumns={simpleColumns}
4742
titleButton={{
4843
label: "Add",

src/pages/email/reports/SharedMailboxEnabledAccount/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const Page = () => {
1919
actions={[
2020
{
2121
label: "Block Sign In",
22-
type: "GET",
22+
type: "POST",
2323
icon: <Block />,
2424
url: "/api/ExecDisableUser",
2525
data: { ID: "id" },

src/pages/email/reports/antiphishing-filters/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@ const Page = () => {
99
const actions = [
1010
{
1111
label: "Enable Rule",
12-
type: "GET",
12+
type: "POST",
1313
icon: <Check />,
1414
url: "/api/EditAntiPhishingFilter",
1515
data: {
16-
State: "Enable",
16+
State: "!Enable",
1717
RuleName: "RuleName",
1818
},
1919
confirmText: "Are you sure you want to enable this rule?",
2020
condition: (row) => row.State === "Disabled",
2121
},
2222
{
2323
label: "Disable Rule",
24-
type: "GET",
24+
type: "POST",
2525
icon: <Block />,
2626
url: "/api/EditAntiPhishingFilter",
2727
data: {
28-
State: "Disable",
28+
State: "!Disable",
2929
RuleName: "RuleName",
3030
},
3131
confirmText: "Are you sure you want to disable this rule?",

src/pages/email/reports/malware-filters/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@ const Page = () => {
1010
actions={[
1111
{
1212
label: "Enable Rule",
13-
type: "GET",
13+
type: "POST",
1414
icon: <Check />,
1515
url: "/api/EditMalwareFilter",
1616
data: {
17-
State: "Enable",
17+
State: "!Enable",
1818
RuleName: "RuleName",
1919
},
2020
confirmText: "Are you sure you want to enable this rule?",
2121
condition: (row) => row.State === "Disabled",
2222
},
2323
{
2424
label: "Disable Rule",
25-
type: "GET",
25+
type: "POST",
2626
icon: <Block />,
2727
url: "/api/EditMalwareFilter",
2828
data: {
29-
State: "Disable",
29+
State: "!Disable",
3030
RuleName: "RuleName",
3131
},
3232
confirmText: "Are you sure you want to disable this rule?",

src/pages/email/reports/safeattachments-filters/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const Page = () => {
1010
const actions = [
1111
{
1212
label: "Enable Rule",
13-
type: "GET",
13+
type: "POST",
1414
icon: <Check />,
1515
url: "/api/EditSafeAttachmentsFilter",
1616
data: {
@@ -19,11 +19,11 @@ const Page = () => {
1919
},
2020
confirmText: "Are you sure you want to enable this rule?",
2121
color: "info",
22-
condition: (row) => row.State === "Disabled"
22+
condition: (row) => row.State === "Disabled",
2323
},
2424
{
2525
label: "Disable Rule",
26-
type: "GET",
26+
type: "POST",
2727
icon: <Block />,
2828
url: "/api/EditSafeAttachmentsFilter",
2929
data: {

0 commit comments

Comments
 (0)