Skip to content

Commit 87e9f9f

Browse files
authored
Merge pull request #470 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents 40c0cf8 + 6150e20 commit 87e9f9f

File tree

15 files changed

+71
-49
lines changed

15 files changed

+71
-49
lines changed

Config/schemaDefinitions.json

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
[
2-
{
3-
"id": "cippUser",
4-
"description": "CIPP User Schema",
5-
"targetTypes": ["User"],
6-
"properties": [
7-
{ "name": "jitAdminEnabled", "type": "Boolean" },
8-
{ "name": "jitAdminExpiration", "type": "DateTime" },
9-
{ "name": "mailboxType", "type": "String" },
10-
{ "name": "archiveEnabled", "type": "Boolean" },
11-
{ "name": "autoExpandingArchiveEnabled", "type": "Boolean" },
12-
{ "name": "perUserMfaState", "type": "String" }
13-
],
14-
"status": "Available"
15-
}
2+
{
3+
"id": "cippUser",
4+
"description": "CIPP User Schema",
5+
"targetTypes": ["User"],
6+
"properties": [
7+
{ "name": "jitAdminEnabled", "type": "Boolean" },
8+
{ "name": "jitAdminExpiration", "type": "DateTime" },
9+
{ "name": "jitAdminReason", "type": "String" },
10+
{ "name": "mailboxType", "type": "String" },
11+
{ "name": "archiveEnabled", "type": "Boolean" },
12+
{ "name": "autoExpandingArchiveEnabled", "type": "Boolean" },
13+
{ "name": "perUserMfaState", "type": "String" }
14+
],
15+
"status": "Available"
16+
}
1617
]

Modules/CIPPCore/Public/Authentication/Get-CIPPHttpFunctions.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ function Get-CIPPHttpFunctions {
1818
}
1919

2020
if ($ByRole.IsPresent -or $ByRoleGroup.IsPresent) {
21-
$Results = $Results | Group-Object -Property Role | Select-Object -Property @{l = 'Permission'; e = { $_.Name -eq '' ? 'None' : $_.Name } }, Count, @{l = 'Functions'; e = { $_.Group | Select-Object @{l='Name'; e={$_.Function -replace 'Invoke-'}}, Description } } | Sort-Object -Property Permission
21+
$Results = $Results | Group-Object -Property Role | Select-Object -Property @{l = 'Permission'; e = { $_.Name -eq '' ? 'None' : $_.Name } }, Count, @{l = 'Functions'; e = { $_.Group | Select-Object @{l = 'Name'; e = { $_.Function -replace 'Invoke-' } }, Description } } | Sort-Object -Property Permission
2222
if ($ByRoleGroup.IsPresent) {
2323
$RoleGroup = @{}
2424
foreach ($Permission in $Results) {
2525
$PermSplit = $Permission.Permission -split '\.'
2626
if ($PermSplit.Count -ne 3) { continue }
27-
if ($RoleGroup[$PermSplit[0]] -eq $null) { $RoleGroup[$PermSplit[0]] = @{} }
28-
if ($RoleGroup[$PermSplit[0]][$PermSplit[1]] -eq $null) { $RoleGroup[$PermSplit[0]][$PermSplit[1]] = @{} }
27+
if ($null -eq $RoleGroup[$PermSplit[0]]) { $RoleGroup[$PermSplit[0]] = @{} }
28+
if ($null -eq $RoleGroup[$PermSplit[0]][$PermSplit[1]]) { $RoleGroup[$PermSplit[0]][$PermSplit[1]] = @{} }
2929
$RoleGroup[$PermSplit[0]][$PermSplit[1]][$PermSplit[2]] = @($Permission.Functions)
3030
}
3131
$Results = $RoleGroup

Modules/CIPPCore/Public/Compare-CIPPIntuneObject.ps1

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,9 @@ function Compare-CIPPIntuneObject {
244244
$child.choiceSettingValue.value
245245
}
246246
}
247+
if (!$childValue -and $null -ne $child.simpleSettingValue -and $null -ne $child.simpleSettingValue.value) {
248+
$childValue = $child.simpleSettingValue.value
249+
}
247250

248251
# Add object to our temporary list
249252
[PSCustomObject]@{
@@ -337,9 +340,9 @@ function Compare-CIPPIntuneObject {
337340
} else {
338341
$child.choiceSettingValue.value
339342
}
340-
if (!$childValue -and $child.simpleSettingValue.value) {
341-
$childValue = $child.simpleSettingValue.value
342-
}
343+
}
344+
if (!$childValue -and $null -ne $child.simpleSettingValue -and $null -ne $child.simpleSettingValue.value) {
345+
$childValue = $child.simpleSettingValue.value
343346
}
344347

345348
# Add object to our temporary list

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Core/Invoke-ExecSetCIPPAutoBackup.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
using namespace System.Net
22

3-
Function Invoke-ExecSetCIPPAutoBackup {
3+
function Invoke-ExecSetCIPPAutoBackup {
44
<#
55
.FUNCTIONALITY
66
Entrypoint
77
.ROLE
8-
CIPP.Backup.Read
8+
CIPP.Backup.ReadWrite
99
#>
1010
[CmdletBinding()]
1111
param($Request, $TriggerMetadata)

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Email-Exchange/Resources/Invoke-ListEquipment.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
using namespace System.Net
22

3-
Function Invoke-ListEquipment {
3+
function Invoke-ListEquipment {
44
<#
55
.FUNCTIONALITY
66
Entrypoint
77
.ROLE
8-
Exchange.Equipment.ReadWrite
8+
Exchange.Equipment.Read
99
#>
1010
[CmdletBinding()]
1111
param($Request, $TriggerMetadata)

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Email-Exchange/Spamfilter/Invoke-EditAntiPhishingFilter.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ function Invoke-EditAntiPhishingFilter {
33
.FUNCTIONALITY
44
Entrypoint
55
.ROLE
6-
Exchange.SpamFilter.Read
6+
Exchange.SpamFilter.ReadWrite
77
#>
88
[CmdletBinding()]
99
param($Request, $TriggerMetadata)
@@ -33,7 +33,7 @@ function Invoke-EditAntiPhishingFilter {
3333
'Disable' {
3434
$ExoRequestParam.Add('cmdlet', 'Disable-AntiPhishRule')
3535
}
36-
Default {
36+
default {
3737
throw 'Invalid state'
3838
}
3939
}

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Email-Exchange/Spamfilter/Invoke-EditMalwareFilter.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ function Invoke-EditMalwareFilter {
33
.FUNCTIONALITY
44
Entrypoint
55
.ROLE
6-
Exchange.SpamFilter.Read
6+
Exchange.SpamFilter.ReadWrite
77
#>
88
[CmdletBinding()]
99
param($Request, $TriggerMetadata)
@@ -33,7 +33,7 @@ function Invoke-EditMalwareFilter {
3333
'Disable' {
3434
$ExoRequestParam.Add('cmdlet', 'Disable-MalwareFilterRule')
3535
}
36-
Default {
36+
default {
3737
throw 'Invalid state'
3838
}
3939
}

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Email-Exchange/Spamfilter/Invoke-EditSafeAttachmentsFilter.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ function Invoke-EditSafeAttachmentsFilter {
33
.FUNCTIONALITY
44
Entrypoint
55
.ROLE
6-
Exchange.SpamFilter.Read
6+
Exchange.SpamFilter.ReadWrite
77
#>
88
[CmdletBinding()]
99
param($Request, $TriggerMetadata)
@@ -33,7 +33,7 @@ function Invoke-EditSafeAttachmentsFilter {
3333
'Disable' {
3434
$ExoRequestParam.Add('cmdlet', 'Disable-SafeAttachmentRule')
3535
}
36-
Default {
36+
default {
3737
throw 'Invalid state'
3838
}
3939
}

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Email-Exchange/Spamfilter/Invoke-ListMailQuarantine.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ function Invoke-ListMailQuarantine {
33
.FUNCTIONALITY
44
Entrypoint
55
.ROLE
6-
Exchange.SpamFilter.ReadWrite
6+
Exchange.SpamFilter.Read
77
#>
88
[CmdletBinding()]
99
param($Request, $TriggerMetadata)

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Email-Exchange/Spamfilter/Invoke-ListMailQuarantineMessage.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ function Invoke-ListMailQuarantineMessage {
33
.FUNCTIONALITY
44
Entrypoint
55
.ROLE
6-
Exchange.SpamFilter.ReadWrite
6+
Exchange.SpamFilter.Read
77
#>
88
[CmdletBinding()]
99
param($Request, $TriggerMetadata)

0 commit comments

Comments
 (0)