Skip to content

Commit d1d0ff9

Browse files
authored
Merge branch 'dev' into dev
Signed-off-by: Jr7468 <[email protected]>
2 parents 1f586db + a0b957d commit d1d0ff9

File tree

11 files changed

+1158
-29
lines changed

11 files changed

+1158
-29
lines changed

src/components/CippIntegrations/CippApiClientManagement.jsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ const CippApiClientManagement = () => {
7878
multiple: false,
7979
creatable: false,
8080
label: "Select Role",
81-
placeholder: "Choose a role from the Custom Role list.",
81+
placeholder: "Choose a role from the CIPP Role list.",
8282
api: {
8383
url: "/api/ListCustomRole",
8484
queryKey: "CustomRoleList",
85-
labelField: "RowKey",
86-
valueField: "RowKey",
85+
labelField: "RoleName",
86+
valueField: "RoleName",
8787
showRefresh: true,
8888
},
8989
},
@@ -316,11 +316,11 @@ const CippApiClientManagement = () => {
316316
api: {
317317
url: "/api/ListCustomRole",
318318
queryKey: "CustomRoleList",
319-
labelField: "RowKey",
320-
valueField: "RowKey",
319+
labelField: "RoleName",
320+
valueField: "RoleName",
321321
showRefresh: true,
322322
},
323-
placeholder: "Choose a role from the Custom Role list.",
323+
placeholder: "Choose a role from the CIPP Role list.",
324324
},
325325
{
326326
type: "autoComplete",
@@ -380,12 +380,12 @@ const CippApiClientManagement = () => {
380380
multiple: false,
381381
creatable: false,
382382
label: "Select Role",
383-
placeholder: "Choose a role from the Custom Role list.",
383+
placeholder: "Choose a role from the CIPP Role list.",
384384
api: {
385385
url: "/api/ListCustomRole",
386386
queryKey: "CustomRoleList",
387-
labelField: "RowKey",
388-
valueField: "RowKey",
387+
labelField: "RoleName",
388+
valueField: "RoleName",
389389
showRefresh: true,
390390
},
391391
},

src/data/Extensions.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@
8181
{
8282
"type": "autoComplete",
8383
"name": "Sherweb.AllowedCustomRoles",
84-
"label": "Select custom roles that are allowed to purchase licenses",
84+
"label": "Select CIPP roles that are allowed to purchase licenses",
8585
"api": {
8686
"url": "/api/ListCustomRole",
8787
"queryKey": "CustomRoles",
88-
"labelField": "RowKey",
89-
"valueField": "RowKey"
88+
"labelField": "RoleName",
89+
"valueField": "RoleName"
9090
},
9191
"multiple": true,
9292
"condition": {

src/data/M365Licenses.json

Lines changed: 969 additions & 1 deletion
Large diffs are not rendered by default.

src/data/alerts.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@
153153
"name": "HuntressRogueApps",
154154
"label": "Alert on Huntress Rogue Apps detected",
155155
"recommendedRunInterval": "4h",
156-
"description": "Huntress has provided a repository of known rogue apps that are commonly used in BEC, data exfiltration and other Microsoft 365 attacks. This alert will notify you if any of these apps are detected in the selected tenant(s). For more information, see <a href='https://huntresslabs.github.io/rogueapps/' target='_blank'>https://huntresslabs.github.io/rogueapps/</a>."
156+
"description": "Huntress has provided a repository of known rogue apps that are commonly used in BEC, data exfiltration and other Microsoft 365 attacks. This alert will notify you if any of these apps are detected in the selected tenant(s). For more information, see <a href='https://huntresslabs.github.io/rogueapps/' target='_blank'>https://huntresslabs.github.io/rogueapps/</a>.",
157+
"requiresInput": true,
158+
"inputType": "switch",
159+
"inputLabel": "Ignore Disabled Apps?",
160+
"inputName": "IgnoreDisabledApps"
157161
}
158162
]

src/data/standards.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,6 +1651,38 @@
16511651
"powershellEquivalent": "Set-OrganizationConfig -BookingsEnabled",
16521652
"recommendedBy": []
16531653
},
1654+
{
1655+
"name": "standards.EXODirectSend",
1656+
"cat": "Exchange Standards",
1657+
"tag": [],
1658+
"helpText": "Sets the state of Direct Send in Exchange Online. Direct Send allows applications to send emails directly to Exchange Online mailboxes as the tenants domains, without requiring authentication.",
1659+
"docsDescription": "Controls whether applications can use Direct Send to send emails directly to Exchange Online mailboxes as the tenants domains, without requiring authentication. A detailed explanation from Microsoft can be found [here.](https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-microsoft-365-or-office-365)",
1660+
"addedComponent": [
1661+
{
1662+
"type": "autoComplete",
1663+
"multiple": false,
1664+
"creatable": false,
1665+
"label": "Select value",
1666+
"name": "standards.EXODirectSend.state",
1667+
"options": [
1668+
{
1669+
"label": "Enabled",
1670+
"value": "enabled"
1671+
},
1672+
{
1673+
"label": "Disabled",
1674+
"value": "disabled"
1675+
}
1676+
]
1677+
}
1678+
],
1679+
"label": "Set Direct Send state",
1680+
"impact": "Medium Impact",
1681+
"impactColour": "warning",
1682+
"addedDate": "2025-05-28",
1683+
"powershellEquivalent": "Set-OrganizationConfig -RejectDirectSend $true/$false",
1684+
"recommendedBy": []
1685+
},
16541686
{
16551687
"name": "standards.DisableOutlookAddins",
16561688
"cat": "Exchange Standards",
@@ -4099,6 +4131,7 @@
40994131
{
41004132
"name": "standards.ExchangeConnectorTemplate",
41014133
"label": "Exchange Connector Template",
4134+
"cat": "Templates",
41024135
"disabledFeatures": {
41034136
"report": true,
41044137
"warn": true,

src/pages/_app.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ import { useRouter } from "next/router";
3535
import { persistQueryClient } from "@tanstack/react-query-persist-client";
3636
import { createSyncStoragePersister } from "@tanstack/query-sync-storage-persister";
3737

38+
const ReactQueryDevtoolsProduction = React.lazy(() =>
39+
import("@tanstack/react-query-devtools/build/modern/production.js").then((d) => ({
40+
default: d.ReactQueryDevtools,
41+
}))
42+
);
3843
TimeAgo.addDefaultLocale(en);
3944

4045
const queryClient = new QueryClient();
@@ -132,12 +137,6 @@ const App = (props) => {
132137
},
133138
];
134139

135-
const ReactQueryDevtoolsProduction = React.lazy(() =>
136-
import("@tanstack/react-query-devtools/build/modern/production.js").then((d) => ({
137-
default: d.ReactQueryDevtools,
138-
}))
139-
);
140-
141140
return (
142141
<CacheProvider value={emotionCache}>
143142
<Head>

src/pages/email/spamfilter/list-quarantine-policies/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const Page = () => {
3030
const GlobalQuarantinePolicy = ApiGetCall({
3131
url: "/api/ListQuarantinePolicy",
3232
data: { tenantFilter: currentTenant, type: "GlobalQuarantinePolicy" },
33-
queryKey: "GlobalQuarantinePolicy",
33+
queryKey: `GlobalQuarantinePolicy-${currentTenant}`,
3434
});
3535

3636
// Get the policy data regardless of array or object
@@ -304,7 +304,7 @@ const Page = () => {
304304
const infoBarData = [
305305
{
306306
icon: <AccessTime />,
307-
data: globalQuarantineData?.EndUserSpamNotificationFrequency,
307+
data: globalQuarantineData?.EndUserSpamNotificationFrequency ?? "n/a",
308308
name: "Notification Frequency",
309309
},
310310
{
@@ -390,7 +390,7 @@ const Page = () => {
390390
Name: "Name",
391391
Identity: "Guid",
392392
},
393-
relatedQueryKeys: ["GlobalQuarantinePolicy"],
393+
relatedQueryKeys: [`GlobalQuarantinePolicy-${currentTenant}`],
394394
confirmText:
395395
"Are you sure you want to update Global Quarantine settings?",
396396
}}

src/pages/endpoint/autopilot/list-profiles/add.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ const AutopilotProfileForm = () => {
6868
type="autoComplete"
6969
label="Language"
7070
name="languages"
71-
options={languageList.map(({ language, tag }) => ({
71+
options={languageList.map(({ language, tag, "Geographic area": geographicArea }) => ({
7272
value: tag,
73-
label: language,
73+
label: `${language} - ${geographicArea}`, // Format as "language - geographic area" for display
7474
}))}
7575
formControl={formControl}
7676
multiple={false}

src/pages/identity/administration/users/user/exchange.jsx

Lines changed: 114 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useRouter } from "next/router";
44
import { ApiGetCall } from "/src/api/ApiCall";
55
import CippFormSkeleton from "/src/components/CippFormPages/CippFormSkeleton";
66
import CalendarIcon from "@heroicons/react/24/outline/CalendarIcon";
7-
import { Check, Error, Mail, Fingerprint, Launch, Delete, Star } from "@mui/icons-material";
7+
import { Check, Error, Mail, Fingerprint, Launch, Delete, Star, Close } from "@mui/icons-material";
88
import { HeaderedTabbedLayout } from "../../../../../layouts/HeaderedTabbedLayout";
99
import tabOptions from "./tabOptions";
1010
import { CippTimeAgo } from "../../../../../components/CippComponents/CippTimeAgo";
@@ -16,7 +16,7 @@ import { CippExchangeInfoCard } from "../../../../../components/CippCards/CippEx
1616
import { useEffect, useState } from "react";
1717
import CippExchangeSettingsForm from "../../../../../components/CippFormPages/CippExchangeSettingsForm";
1818
import { useForm } from "react-hook-form";
19-
import { Alert, Button, Collapse, CircularProgress, Typography } from "@mui/material";
19+
import { Alert, Button, Collapse, CircularProgress, Typography, TextField, Dialog, DialogTitle, DialogContent, DialogActions, IconButton } from "@mui/material";
2020
import { CippApiResults } from "../../../../../components/CippComponents/CippApiResults";
2121
import { Block, PlayArrow } from "@mui/icons-material";
2222
import { CippPropertyListCard } from "../../../../../components/CippCards/CippPropertyListCard";
@@ -31,6 +31,10 @@ const Page = () => {
3131
const [waiting, setWaiting] = useState(false);
3232
const [showDetails, setShowDetails] = useState(false);
3333
const [actionData, setActionData] = useState({ ready: false });
34+
const [showAddAliasDialog, setShowAddAliasDialog] = useState(false);
35+
const [newAliases, setNewAliases] = useState('');
36+
const [isSubmitting, setIsSubmitting] = useState(false);
37+
const [submitResult, setSubmitResult] = useState(null);
3438
const createDialog = useDialog();
3539
const router = useRouter();
3640
const { userId } = router.query;
@@ -321,14 +325,53 @@ const Page = () => {
321325
relatedQueryKeys: `ListUsers-${userId}`,
322326
},
323327
];
328+
329+
const handleAddAliases = () => {
330+
const aliases = newAliases
331+
.split('\n')
332+
.map(alias => alias.trim())
333+
.filter(alias => alias);
334+
if (aliases.length > 0) {
335+
setIsSubmitting(true);
336+
setSubmitResult(null);
337+
fetch('/api/SetUserAliases', {
338+
method: 'POST',
339+
headers: {
340+
'Content-Type': 'application/json',
341+
},
342+
body: JSON.stringify({
343+
id: userId,
344+
tenantFilter: userSettingsDefaults.currentTenant,
345+
AddedAliases: aliases.join(','),
346+
userPrincipalName: graphUserRequest.data?.[0]?.userPrincipalName,
347+
}),
348+
})
349+
.then(response => response.json())
350+
.then(data => {
351+
setSubmitResult({ success: true, message: 'Aliases added successfully' });
352+
graphUserRequest.refetch();
353+
setTimeout(() => {
354+
setShowAddAliasDialog(false);
355+
setNewAliases('');
356+
setSubmitResult(null);
357+
}, 1500);
358+
})
359+
.catch(error => {
360+
setSubmitResult({ success: false, message: 'Failed to add aliases' });
361+
})
362+
.finally(() => {
363+
setIsSubmitting(false);
364+
});
365+
}
366+
};
324367

325368
const proxyAddressesCard = [
326369
{
327370
id: 1,
328371
cardLabelBox: {
329372
cardLabelBoxHeader: graphUserRequest.isFetching ? (
330373
<CircularProgress size="25px" color="inherit" />
331-
) : graphUserRequest.data?.[0]?.proxyAddresses?.length !== 0 ? (
374+
) : graphUserRequest.data?.[0]?.proxyAddresses?.length > 1 ? (
332375
<Check />
333376
) : (
334377
<Error />
@@ -372,6 +415,19 @@ const Page = () => {
372415
},
373416
},
374417
},
418+
children: (
419+
<Box sx={{ display: 'flex', justifyContent: 'flex-end', alignItems: 'center', mb: 2, px: 2 }}>
420+
<Button
421+
startIcon={<Mail />}
422+
onClick={() => setShowAddAliasDialog(true)}
423+
variant="contained"
424+
color="primary"
425+
size="small"
426+
>
427+
Add Alias
428+
</Button>
429+
</Box>
430+
),
375431
},
376432
];
377433

@@ -475,6 +531,61 @@ const Page = () => {
475531
row={actionData.data}
476532
/>
477533
)}
534+
<Dialog
535+
open={showAddAliasDialog}
536+
onClose={() => setShowAddAliasDialog(false)}
537+
maxWidth="sm"
538+
fullWidth
539+
>
540+
<DialogTitle>
541+
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
542+
Add Proxy Addresses
543+
<IconButton onClick={() => setShowAddAliasDialog(false)} size="small">
544+
<Close />
545+
</IconButton>
546+
</Box>
547+
</DialogTitle>
548+
<DialogContent>
549+
<Box sx={{ mt: 2 }}>
550+
<TextField
551+
autoFocus
552+
fullWidth
553+
multiline
554+
rows={6}
555+
value={newAliases}
556+
onChange={(e) => setNewAliases(e.target.value)}
557+
placeholder="One alias per line"
558+
variant="outlined"
559+
disabled={isSubmitting}
560+
/>
561+
{submitResult && (
562+
<Alert
563+
severity={submitResult.success ? "success" : "error"}
564+
sx={{ mt: 2 }}
565+
>
566+
{submitResult.message}
567+
</Alert>
568+
)}
569+
</Box>
570+
</DialogContent>
571+
<DialogActions sx={{ px: 3, pb: 2 }}>
572+
<Button
573+
onClick={() => setShowAddAliasDialog(false)}
574+
disabled={isSubmitting}
575+
>
576+
Cancel
577+
</Button>
578+
<Button
579+
onClick={handleAddAliases}
580+
variant="contained"
581+
color="primary"
582+
disabled={!newAliases.trim() || isSubmitting}
583+
startIcon={isSubmitting ? <CircularProgress size={20} color="inherit" /> : null}
584+
>
585+
{isSubmitting ? 'Adding...' : 'Add Aliases'}
586+
</Button>
587+
</DialogActions>
588+
</Dialog>
478589
</HeaderedTabbedLayout>
479590
);
480591
};

src/pages/teams-share/teams/list-team/add.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const TeamsAddTeamForm = () => {
2828
title="Add Team"
2929
backButtonTitle="Teams Overview"
3030
postUrl="/api/AddTeam"
31+
resetForm={true}
3132
customDataformatter={(values) => {
3233
const shippedValues = {
3334
tenantID: tenantDomain,

0 commit comments

Comments
 (0)