Skip to content

Commit

Permalink
Merge pull request #2 from KelvinTegelaar/main
Browse files Browse the repository at this point in the history
[pull] main from KelvinTegelaar:main
  • Loading branch information
pull[bot] authored Jan 16, 2025
2 parents 207c67b + 007ec77 commit 9396ac1
Show file tree
Hide file tree
Showing 24 changed files with 98 additions and 73 deletions.
2 changes: 1 addition & 1 deletion public/version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "7.0.3"
"version": "7.0.4"
}
9 changes: 5 additions & 4 deletions src/components/CippComponents/CippFormLicenseSelector.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { CippFormComponent } from "./CippFormComponent";
import { useWatch } from "react-hook-form";
import { getCippLicenseTranslation } from "../../utils/get-cipp-license-translation";
import { useSettings } from "../../hooks/use-settings";

export const CippFormLicenseSelector = ({
formControl,
Expand All @@ -12,25 +12,26 @@ export const CippFormLicenseSelector = ({
addedField,
...other
}) => {
const currentTenant = useWatch({ control: formControl.control, name: "tenantFilter" });
const userSettingsDefaults = useSettings();
return (
<CippFormComponent
name={name}
label={label}
type="autoComplete"
formControl={formControl}
multiple={multiple}
creatable={false}
api={{
addedField: addedField,
tenantFilter: currentTenant ? currentTenant.value : undefined,
tenantFilter: userSettingsDefaults.currentTenant ?? undefined,
url: "/api/ListGraphRequest",
dataKey: "Results",
labelField: (option) =>
`${getCippLicenseTranslation([option])} (${
option.prepaidUnits.enabled - option.consumedUnits
} available)`,
valueField: "skuId",
queryKey: `ListLicenses-${currentTenant?.value}`,
queryKey: `ListLicenses-${userSettingsDefaults.currentTenant ?? undefined}`,
data: {
Endpoint: "subscribedSkus",
$count: true,
Expand Down
2 changes: 1 addition & 1 deletion src/components/CippComponents/CippTenantSelector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export const CippTenantSelector = (props) => {
icon: <Laptop />,
},
{
label: "Sharepoint Portal",
label: "SharePoint Portal",
link: `https://admin.microsoft.com/Partner/beginclientsession.aspx?CTID=${currentTenant?.addedFields?.customerId}&CSDEST=SharePoint`,
icon: <Share />,
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/CippComponents/CippTranslations.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const CippTranslations = {
portal_intune: "Intune Portal",
portal_security: "Security Portal",
portal_compliance: "Compliance Portal",
portal_sharepoint: "Sharepoint Portal",
portal_sharepoint: "SharePoint Portal",
"@odata.type": "Type",
roleDefinitionId: "GDAP Role",
FromIP: "From IP",
Expand Down
9 changes: 9 additions & 0 deletions src/components/CippFormPages/CippAddEditUser.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,15 @@ const CippAddEditUser = (props) => {
formControl={formControl}
/>
</Grid>
<Grid item xs={12} md={6}>
<CippFormComponent
type="textField"
fullWidth
label="Alternate Email Address"
name="otherMails"
formControl={formControl}
/>
</Grid>
{userSettingsDefaults?.userAttributes?.map((attribute, idx) => (
<Grid item xs={6} key={idx}>
<CippFormComponent
Expand Down
2 changes: 1 addition & 1 deletion src/data/CIPPDefaultGDAPRoles.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"value": "69091246-20e8-4a56-aa4d-066075b2a7a8"
},
{
"label": "Sharepoint Administrator",
"label": "SharePoint Administrator",
"value": "f28a1f50-f6e7-4571-818b-6a12f2af6b6c"
},
{
Expand Down
4 changes: 2 additions & 2 deletions src/data/intuneCollection.json
Original file line number Diff line number Diff line change
Expand Up @@ -73017,7 +73017,7 @@
},
{
"id": "device_vendor_msft_policy_config_fslogixv1~policy~fslogix~odfc_odfcincludesharepoint",
"displayName": "Include Sharepoint",
"displayName": "Include SharePoint",
"options": [
{
"id": "device_vendor_msft_policy_config_fslogixv1~policy~fslogix~odfc_odfcincludesharepoint_0",
Expand Down Expand Up @@ -209011,7 +209011,7 @@
},
{
"id": "user_vendor_msft_policy_config_outlk16v2~policy~l_microsoftofficeoutlook~l_toolsaccounts~l_sharepointintegration_l_disablesharepointintegrationinoutlook",
"displayName": "Do not allow Sharepoint-Outlook integration (User)",
"displayName": "Do not allow SharePoint-Outlook integration (User)",
"options": [
{
"id": "user_vendor_msft_policy_config_outlk16v2~policy~l_microsoftofficeoutlook~l_toolsaccounts~l_sharepointintegration_l_disablesharepointintegrationinoutlook_0",
Expand Down
4 changes: 2 additions & 2 deletions src/data/portals.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
"icon": "shield-alt"
},
{
"label": "Sharepoint Admin",
"name": "Sharepoint_Admin",
"label": "SharePoint Admin",
"name": "SharePoint_Admin",
"url": "https://admin.microsoft.com/Partner/beginclientsession.aspx?CTID=customerId&CSDEST=SharePoint",
"variable": "customerId",
"target": "_blank",
Expand Down
8 changes: 4 additions & 4 deletions src/data/standards.json
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@
"name": "standards.DisableM365GroupUsers",
"cat": "Entra (AAD) Standards",
"tag": ["lowimpact"],
"helpText": "Restricts M365 group creation to certain admin roles. This disables the ability to create Teams, Sharepoint sites, Planner, etc",
"helpText": "Restricts M365 group creation to certain admin roles. This disables the ability to create Teams, SharePoint sites, Planner, etc",
"docsDescription": "Users by default are allowed to create M365 groups. This restricts M365 group creation to certain admin roles. This disables the ability to create Teams, SharePoint sites, Planner, etc",
"addedComponent": [],
"label": "Disable M365 Group creation by users",
Expand Down Expand Up @@ -1682,7 +1682,7 @@
"name": "standards.AtpPolicyForO365",
"cat": "Defender Standards",
"tag": ["lowimpact", "CIS"],
"helpText": "This creates a Atp policy that enables Defender for Office 365 for Sharepoint, OneDrive and Microsoft Teams.",
"helpText": "This creates a Atp policy that enables Defender for Office 365 for SharePoint, OneDrive and Microsoft Teams.",
"addedComponent": [
{
"type": "switch",
Expand Down Expand Up @@ -2360,7 +2360,7 @@
"name": "standards.sharingCapability",
"cat": "SharePoint Standards",
"tag": ["highimpact", "CIS"],
"helpText": "Sets the default sharing level for OneDrive and Sharepoint. This is a tenant wide setting and overrules any settings set on the site level",
"helpText": "Sets the default sharing level for OneDrive and SharePoint. This is a tenant wide setting and overrules any settings set on the site level",
"addedComponent": [
{
"type": "autoComplete",
Expand All @@ -2387,7 +2387,7 @@
]
}
],
"label": "Set Sharing Level for OneDrive and Sharepoint",
"label": "Set Sharing Level for OneDrive and SharePoint",
"impact": "High Impact",
"impactColour": "danger",
"powershellEquivalent": "Update-MgBetaAdminSharepointSetting",
Expand Down
4 changes: 2 additions & 2 deletions src/layouts/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ export const nativeMenuItems = [
{ title: "Users", path: "/identity/administration/users" },
{ title: "Risky Users", path: "/identity/administration/risky-users" },
{ title: "Groups", path: "/identity/administration/groups" },
{ title: "Devices", path: "/identity/administration/devices" },
{
title: "Group Templates",
path: "/identity/administration/group-templates",
},
{ title: "Devices", path: "/identity/administration/devices" },
{ title: "Deleted Items", path: "/identity/administration/deleted-items" },
{ title: "Roles", path: "/identity/administration/roles" },
{ title: "JIT Admin", path: "/identity/administration/jit-admin" },
Expand Down Expand Up @@ -468,7 +468,7 @@ export const nativeMenuItems = [
title: "Timers",
path: "/cipp/advanced/timers",
roles: ["superadmin"],
}
},
],
},
],
Expand Down
13 changes: 13 additions & 0 deletions src/pages/cipp/settings/tenants.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,19 @@ const Page = () => {
actions={actions}
offCanvas={offCanvas}
simpleColumns={columns}
filters={[
{
filterName: "Included tenants",
//true or false filters by yes/no
value: [{ id: "Excluded", value: "No" }],
type: "column",
},
{
filterName: "Excluded tenants",
value: [{ id: "Excluded", value: "Yes" }],
type: "column",
},
]}
/>
<CippApiDialog
title="Force Refresh Tenant"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const Page = () => {
apiData={{
Endpoint: "deviceAppManagement/managedAppPolicies",
$orderby: "displayName",
manualPagination: true,
}}
apiDataKey="Results"
actions={actions}
Expand Down
18 changes: 7 additions & 11 deletions src/pages/endpoint/MEM/list-compliance-policies/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,22 @@ const Page = () => {
const actions = [
{
label: "Create template based on policy",
type: "POST",
type: "GET",
url: "/api/AddIntuneTemplate",
data: {
TenantFilter: "Tenant",
ID: "id",
URLName: "deviceCompliancePolicies",
URLName: "URLName",
},
confirmText: "Are you sure you want to create a template based on this policy?",
icon: <Book />,
color: "info",
},
{
label: "Assign to All Users",
type: "POST",
type: "GET",
url: "/api/ExecAssignPolicy",
data: {
AssignTo: "allLicensedUsers",
TenantFilter: "Tenant",
ID: "id",
type: "deviceCompliancePolicies",
},
Expand All @@ -36,11 +34,10 @@ const Page = () => {
},
{
label: "Assign to All Devices",
type: "POST",
type: "GET",
url: "/api/ExecAssignPolicy",
data: {
AssignTo: "AllDevices",
TenantFilter: "Tenant",
ID: "id",
type: "deviceCompliancePolicies",
},
Expand All @@ -50,11 +47,10 @@ const Page = () => {
},
{
label: "Assign Globally (All Users / All Devices)",
type: "POST",
type: "GET",
url: "/api/ExecAssignPolicy",
data: {
AssignTo: "AllDevicesAndUsers",
TenantFilter: "Tenant",
ID: "id",
type: "deviceCompliancePolicies",
},
Expand All @@ -64,10 +60,9 @@ const Page = () => {
},
{
label: "Delete Policy",
type: "POST",
type: "GET",
url: "/api/RemovePolicy",
data: {
TenantFilter: "Tenant",
ID: "id",
URLName: "deviceCompliancePolicies",
},
Expand Down Expand Up @@ -99,6 +94,7 @@ const Page = () => {
$orderby: "displayName",
$count: true,
$expand: "assignments",
manualPagination: true,
}}
actions={actions}
offCanvas={offCanvas}
Expand Down
36 changes: 21 additions & 15 deletions src/pages/endpoint/autopilot/list-devices/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,35 @@ const Page = () => {
type: "POST",
url: "/api/ExecAssignAPDevice",
data: {
TenantFilter: "Tenant",
userid: "id",
message: "message",
Device: "id",
device: "id",
serialNumber: "serialNumber",
},
confirmText: "Select the user to assign",
modalDropdown: {
url: "/api/listUsers",
labelField: "userPrincipalName",
valueField: "id",
addedField: {
userPrincipalName: "userPrincipalName",
addressableUserName: "displayName",
groupName: "displayName",
confirmText: "Select the user to assign the device to",
fields: [
{
type: "autoComplete",
name: "user",
label: "Select User",
multiple: false,
creatable: false,
api: {
url: "/api/listUsers",
labelField: (user) => `${user.displayName} (${user.userPrincipalName})`,
valueField: "userPrincipalName",
addedField: {
userPrincipalName: "userPrincipalName",
addressableUserName: "displayName",
},
},
},
},
],
color: "info",
},
{
label: "Delete Device",
type: "POST",
url: "/api/RemoveAPDevice",
data: { ID: "id", tenantFilter: "Tenant" },
data: { ID: "id" },
confirmText: "Are you sure you want to delete this device?",
color: "danger",
},
Expand Down
9 changes: 0 additions & 9 deletions src/pages/endpoint/reports/devices/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const Page = () => {
type: "POST",
url: "/api/ExecDeviceAction",
data: {
TenantFilter: "TenantFilter",
GUID: "id",
Action: "syncDevice",
},
Expand All @@ -21,7 +20,6 @@ const Page = () => {
type: "POST",
url: "/api/ExecDeviceAction",
data: {
TenantFilter: "TenantFilter",
GUID: "id",
Action: "rebootNow",
},
Expand All @@ -32,7 +30,6 @@ const Page = () => {
type: "POST",
url: "/api/ExecDeviceAction",
data: {
TenantFilter: "TenantFilter",
GUID: "id",
Action: "locateDevice",
},
Expand All @@ -43,7 +40,6 @@ const Page = () => {
type: "POST",
url: "/api/ExecGetLocalAdminPassword",
data: {
TenantFilter: "TenantFilter",
GUID: "azureADDeviceId",
},
confirmText: "Are you sure you want to retrieve the local admin password?",
Expand All @@ -53,7 +49,6 @@ const Page = () => {
type: "POST",
url: "/api/ExecDeviceAction",
data: {
TenantFilter: "TenantFilter",
GUID: "id",
Action: "RotateLocalAdminPassword",
},
Expand All @@ -64,7 +59,6 @@ const Page = () => {
type: "POST",
url: "/api/ExecGetRecoveryKey",
data: {
TenantFilter: "TenantFilter",
GUID: "azureADDeviceId",
},
confirmText: "Are you sure you want to retrieve the Bitlocker keys?",
Expand All @@ -74,7 +68,6 @@ const Page = () => {
type: "POST",
url: "/api/ExecDeviceAction",
data: {
TenantFilter: "TenantFilter",
GUID: "id",
Action: "WindowsDefenderScan",
quickScan: false,
Expand All @@ -86,7 +79,6 @@ const Page = () => {
type: "POST",
url: "/api/ExecDeviceAction",
data: {
TenantFilter: "TenantFilter",
GUID: "id",
Action: "WindowsDefenderScan",
quickScan: true,
Expand All @@ -98,7 +90,6 @@ const Page = () => {
type: "POST",
url: "/api/ExecDeviceAction",
data: {
TenantFilter: "TenantFilter",
GUID: "id",
Action: "windowsDefenderUpdateSignatures",
},
Expand Down
Loading

0 comments on commit 9396ac1

Please sign in to comment.