Skip to content

Commit d2d5469

Browse files
committed
standards fixes
1 parent 2063a86 commit d2d5469

File tree

3 files changed

+9
-15
lines changed

3 files changed

+9
-15
lines changed

Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardEnableAppConsentRequests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function Invoke-CIPPStandardEnableAppConsentRequests {
121121
if ($Settings.report -eq $true) {
122122

123123
$CurrentValue = [PSCustomObject]@{
124-
EnableAppConsentRequests = $CurrentInfo.isEnabled
124+
EnableAppConsentRequests = [bool]$CurrentInfo.isEnabled
125125
ReviewerCount = $CurrentInfo.reviewers.count
126126
}
127127
$ExpectedValue = [PSCustomObject]@{

Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardMDMScope.ps1

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -144,18 +144,12 @@ function Invoke-CIPPStandardMDMScope {
144144

145145
if ($Settings.report -eq $true) {
146146
$CurrentValue = @{
147-
termsOfUseUrl = $CurrentInfo.termsOfUseUrl
148-
discoveryUrl = $CurrentInfo.discoveryUrl
149-
complianceUrl = $CurrentInfo.complianceUrl
150-
appliesTo = $CurrentInfo.appliesTo
151-
customGroup = $CurrentInfo.includedGroups.displayName
147+
appliesTo = $CurrentInfo.appliesTo
148+
customGroup = $CurrentInfo.includedGroups.displayName ?? ''
152149
}
153150
$ExpectedValue = @{
154-
termsOfUseUrl = $Settings.termsOfUseUrl
155-
discoveryUrl = $Settings.discoveryUrl
156-
complianceUrl = $Settings.complianceUrl
157-
appliesTo = $Settings.appliesTo
158-
customGroup = $Settings.customGroup
151+
appliesTo = $Settings.appliesTo
152+
customGroup = $Settings.customGroup ?? ''
159153
}
160154
Set-CIPPStandardsCompareField -FieldName 'standards.MDMScope' -CurrentValue $CurrentValue -ExpectedValue $ExpectedValue -TenantFilter $Tenant
161155
Add-CIPPBPAField -FieldName 'MDMScope' -FieldValue $StateIsCorrect -StoreAs bool -Tenant $tenant

Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardSpoofWarn.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,13 @@ function Invoke-CIPPStandardSpoofWarn {
133133
Add-CIPPBPAField -FieldName 'SpoofingWarnings' -FieldValue $CurrentInfo.Enabled -StoreAs bool -Tenant $Tenant
134134

135135
$CurrentValue = @{
136-
Enabled = $CurrentInfo.Enabled
137-
AllowList = $CurrentInfo.AllowList
136+
Enabled = $CurrentInfo.Enabled
137+
AllowList = $CurrentInfo.AllowList
138138
IsCompliant = $CurrentInfo.Enabled -eq $IsEnabled -and $AllowListCorrect
139139
}
140140
$ExpectedValue = @{
141-
Enabled = $IsEnabled
142-
AllowList = $Settings.AllowListAdd.value ?? $Settings.AllowListAdd
141+
Enabled = $IsEnabled
142+
AllowList = @($Settings.AllowListAdd.value ?? $Settings.AllowListAdd ?? @())
143143
IsCompliant = $true
144144
}
145145
Set-CIPPStandardsCompareField -FieldName 'standards.SpoofWarn' -CurrentValue $CurrentValue -ExpectedValue $ExpectedValue -Tenant $Tenant

0 commit comments

Comments
 (0)