Skip to content

Commit e065bc0

Browse files
authored
Merge pull request #146 from KelvinTegelaar/main
[pull] main from KelvinTegelaar:main
2 parents 56505b3 + d472a1b commit e065bc0

File tree

16 files changed

+421
-340
lines changed

16 files changed

+421
-340
lines changed

public/version.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "7.3.1"
2+
"version": "7.3.2"
33
}

src/components/CippComponents/CippAutocomplete.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export const CippAutoComplete = (props) => {
9999
setGetRequestInfo({
100100
url: api.url,
101101
data: {
102-
...(!api.excludeTenantFilter ? { TenantFilter: currentTenant } : null),
102+
...(!api.excludeTenantFilter ? { tenantFilter: currentTenant } : null),
103103
...api.data,
104104
},
105105
waiting: true,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,240 @@
1+
import {
2+
EyeIcon,
3+
TrashIcon,
4+
MagnifyingGlassIcon,
5+
PlayCircleIcon,
6+
} from "@heroicons/react/24/outline";
7+
import {
8+
Archive,
9+
MailOutline,
10+
Person,
11+
Room,
12+
Visibility,
13+
VisibilityOff,
14+
PhonelinkLock,
15+
Key,
16+
PostAdd,
17+
Add,
18+
} from "@mui/icons-material";
19+
import { useSettings } from "/src/hooks/use-settings.js";
20+
21+
export const CippExchangeActions = () => {
22+
// const tenant = useSettings().currentTenant;
23+
return [
24+
{
25+
label: "Edit permissions",
26+
link: "/identity/administration/users/user/exchange?userId=[ExternalDirectoryObjectId]",
27+
color: "info",
28+
icon: <Key />,
29+
},
30+
{
31+
label: "Research Compromised Account",
32+
link: "/identity/administration/users/user/bec?userId=[ExternalDirectoryObjectId]",
33+
color: "info",
34+
icon: <MagnifyingGlassIcon />,
35+
},
36+
{
37+
label: "Send MFA Push",
38+
type: "POST",
39+
url: "/api/ExecSendPush",
40+
data: {
41+
UserEmail: "UPN",
42+
},
43+
confirmText: "Are you sure you want to send an MFA request?",
44+
icon: <PhonelinkLock />,
45+
},
46+
{
47+
label: "Convert to User Mailbox",
48+
type: "POST",
49+
url: "/api/ExecConvertMailbox",
50+
icon: <Person />,
51+
data: {
52+
ID: "UPN",
53+
MailboxType: "!Regular",
54+
},
55+
confirmText: "Are you sure you want to convert this mailbox to a user mailbox?",
56+
condition: (row) => row.recipientTypeDetails !== "UserMailbox",
57+
},
58+
{
59+
label: "Convert to Shared Mailbox",
60+
type: "POST",
61+
icon: <MailOutline />,
62+
url: "/api/ExecConvertMailbox",
63+
data: {
64+
ID: "UPN",
65+
MailboxType: "!Shared",
66+
},
67+
confirmText: "Are you sure you want to convert this mailbox to a shared mailbox?",
68+
condition: (row) => row.recipientTypeDetails !== "SharedMailbox",
69+
},
70+
{
71+
label: "Convert to Room Mailbox",
72+
type: "POST",
73+
url: "/api/ExecConvertMailbox",
74+
icon: <Room />,
75+
data: {
76+
ID: "UPN",
77+
MailboxType: "!Room",
78+
},
79+
confirmText: "Are you sure you want to convert this mailbox to a room mailbox?",
80+
condition: (row) => row.recipientTypeDetails !== "RoomMailbox",
81+
},
82+
{
83+
//tested
84+
label: "Enable Online Archive",
85+
type: "POST",
86+
icon: <Archive />,
87+
url: "/api/ExecEnableArchive",
88+
data: { ID: "Id", username: "UPN" },
89+
confirmText: "Are you sure you want to enable the online archive for this user?",
90+
multiPost: false,
91+
condition: (row) => row.ArchiveGuid === "00000000-0000-0000-0000-000000000000",
92+
},
93+
{
94+
label: "Enable Auto-Expanding Archive",
95+
type: "POST",
96+
icon: <PostAdd />,
97+
url: "/api/ExecEnableAutoExpandingArchive",
98+
data: { ID: "Id", username: "UPN" },
99+
confirmText:
100+
"Are you sure you want to enable auto-expanding archive for this user? The archive must already be enabled.",
101+
multiPost: false,
102+
condition: (row) => row.ArchiveGuid !== "00000000-0000-0000-0000-000000000000",
103+
},
104+
{
105+
label: "Hide from Global Address List",
106+
type: "POST",
107+
url: "/api/ExecHideFromGAL",
108+
icon: <VisibilityOff />,
109+
data: {
110+
ID: "UPN",
111+
HidefromGAL: true,
112+
},
113+
confirmText:
114+
"Are you sure you want to hide this mailbox from the global address list? This will not work if the user is AD Synced.",
115+
condition: (row) => row.HiddenFromAddressListsEnabled === false,
116+
},
117+
{
118+
label: "Unhide from Global Address List",
119+
type: "POST",
120+
url: "/api/ExecHideFromGAL",
121+
icon: <Visibility />,
122+
data: {
123+
ID: "UPN",
124+
HidefromGAL: false,
125+
},
126+
confirmText:
127+
"Are you sure you want to unhide this mailbox from the global address list? This will not work if the user is AD Synced.",
128+
condition: (row) => row.HiddenFromAddressListsEnabled === true,
129+
},
130+
{
131+
label: "Start Managed Folder Assistant",
132+
type: "POST",
133+
url: "/api/ExecStartManagedFolderAssistant",
134+
icon: <PlayCircleIcon />,
135+
data: {
136+
ID: "ExchangeGuid",
137+
UserPrincipalName: "UPN",
138+
},
139+
confirmText: "Are you sure you want to start the managed folder assistant for this user?",
140+
},
141+
{
142+
label: "Delete Mailbox",
143+
type: "POST",
144+
icon: <TrashIcon />,
145+
url: "/api/RemoveUser",
146+
data: { ID: "UPN" },
147+
confirmText: "Are you sure you want to delete this mailbox?",
148+
multiPost: false,
149+
},
150+
{
151+
label: "Copy Sent Items to Shared Mailbox",
152+
type: "POST",
153+
url: "/api/ExecCopyForSent",
154+
data: { ID: "UPN" },
155+
confirmText: "Are you sure you want to enable Copy Sent Items to Shared Mailbox?",
156+
icon: <MailOutline />,
157+
condition: (row) =>
158+
row.MessageCopyForSentAsEnabled === false && row.recipientTypeDetails === "SharedMailbox",
159+
},
160+
{
161+
label: "Disable Copy Sent Items to Shared Mailbox",
162+
type: "POST",
163+
url: "/api/ExecCopyForSent",
164+
data: { ID: "UPN", MessageCopyForSentAsEnabled: false },
165+
confirmText: "Are you sure you want to disable Copy Sent Items to Shared Mailbox?",
166+
icon: <MailOutline />,
167+
condition: (row) =>
168+
row.MessageCopyForSentAsEnabled === true && row.recipientTypeDetails === "SharedMailbox",
169+
},
170+
{
171+
label: "Set mailbox locale",
172+
type: "POST",
173+
url: "/api/ExecSetMailboxLocale",
174+
data: { user: "UPN", ProhibitSendQuota: true },
175+
confirmText: "Enter a locale, e.g. en-US",
176+
icon: <MailOutline />,
177+
fields: [
178+
{
179+
label: "Locale",
180+
name: "locale",
181+
type: "textField",
182+
placeholder: "e.g. en-US",
183+
},
184+
],
185+
},
186+
{
187+
label: "Set Send Quota",
188+
type: "POST",
189+
url: "/api/ExecSetMailboxQuota",
190+
data: { user: "UPN", ProhibitSendQuota: true },
191+
confirmText: "Enter a quota. e.g. 1000MB, 10GB,1TB",
192+
icon: <MailOutline />,
193+
fields: [
194+
{
195+
label: "Quota",
196+
name: "quota",
197+
type: "textField",
198+
placeholder: "e.g. 1000MB, 10GB,1TB",
199+
},
200+
],
201+
},
202+
{
203+
label: "Set Send and Receive Quota",
204+
type: "POST",
205+
url: "/api/ExecSetMailboxQuota",
206+
data: {
207+
user: "UPN",
208+
ProhibitSendReceiveQuota: true,
209+
},
210+
confirmText: "Enter a quota. e.g. 1000MB, 10GB,1TB",
211+
icon: <MailOutline />,
212+
fields: [
213+
{
214+
label: "Quota",
215+
name: "quota",
216+
type: "textField",
217+
placeholder: "e.g. 1000MB, 10GB,1TB",
218+
},
219+
],
220+
},
221+
{
222+
label: "Set Quota Warning Level",
223+
type: "POST",
224+
url: "/api/ExecSetMailboxQuota",
225+
data: { user: "UPN", IssueWarningQuota: true },
226+
confirmText: "Enter a quota. e.g. 1000MB, 10GB,1TB",
227+
icon: <MailOutline />,
228+
fields: [
229+
{
230+
label: "Quota",
231+
name: "quota",
232+
type: "textField",
233+
placeholder: "e.g. 1000MB, 10GB,1TB",
234+
},
235+
],
236+
},
237+
];
238+
};
239+
240+
export default CippExchangeActions;

src/components/CippFormPages/CippAddEditUser.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ const CippAddEditUser = (props) => {
269269
formControl={formControl}
270270
/>
271271
</Grid>
272-
{userSettingsDefaults?.userAttributes?.map((attribute, idx) => (
272+
{userSettingsDefaults?.userAttributes?.filter((attribute) => attribute.value !== "sponsor").map((attribute, idx) => (
273273
<Grid item xs={6} key={idx}>
274274
<CippFormComponent
275275
type="textField"

src/components/CippTable/CippDataTable.js

+1
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ export const CippDataTable = (props) => {
287287
</>
288288
);
289289
},
290+
enableGlobalFilterModes: true,
290291
});
291292

292293
useEffect(() => {

src/layouts/config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ export const nativeMenuItems = [
463463
),
464464
items: [
465465
{ title: "Application Settings", path: "/cipp/settings", roles: ["admin", "superadmin"] },
466-
{ title: "Logbook", path: "/cipp/logs", roles: ["admin", "superadmin"] },
466+
{ title: "Logbook", path: "/cipp/logs", roles: ["editor", "admin", "superadmin"] },
467467
{ title: "SAM Setup Wizard", path: "/onboarding", roles: ["admin", "superadmin"] },
468468
{ title: "Integrations", path: "/cipp/integrations", roles: ["admin", "superadmin"] },
469469
{

src/layouts/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ export const Layout = (props) => {
231231
}}
232232
>
233233
<LayoutContainer>
234-
{currentTenant === "AllTenants" && !allTenantsSupport ? (
234+
{(currentTenant === "AllTenants" || !currentTenant) && !allTenantsSupport ? (
235235
<Box sx={{ flexGrow: 1, py: 4 }}>
236236
<Container maxWidth={false}>
237237
<Grid container spacing={3}>

src/pages/cipp/preferences.js

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const Page = () => {
3535
{ value: "otherMails", label: "otherMails" },
3636
{ value: "showInAddressList", label: "showInAddressList" },
3737
{ value: "state", label: "state" },
38+
{ value: "city", label: "city" },
3839
{ value: "sponsor", label: "sponsor" },
3940
];
4041

src/pages/cipp/scheduler/index.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -82,19 +82,20 @@ const Page = () => {
8282
tenantInTitle={false}
8383
title="Scheduled Tasks"
8484
apiUrl={
85-
showHiddenJobs ? "/api/ListScheduledItems?ListHidden=True" : "/api/ListScheduledItems"
85+
showHiddenJobs ? "/api/ListScheduledItems?ShowHidden=true" : "/api/ListScheduledItems"
8686
}
8787
queryKey={showHiddenJobs ? `ListScheduledItems-hidden` : `ListScheduledItems`}
8888
simpleColumns={[
89-
"Name",
90-
"Tenant",
89+
"ExecutedTime",
9190
"TaskState",
91+
"Tenant",
92+
"Name",
93+
"ScheduledTime",
9294
"Command",
9395
"Parameters",
9496
"PostExecution",
9597
"Recurrence",
96-
"ExecutedTime",
97-
"ScheduledTime",
98+
"Results",
9899
]}
99100
actions={actions}
100101
offCanvas={offCanvas}

0 commit comments

Comments
 (0)