Skip to content

Commit

Permalink
Merge pull request #3049 from ykuijs/Dev
Browse files Browse the repository at this point in the history
Fixed issues in SCSensitivityLabel in Get method
  • Loading branch information
ykuijs authored Mar 21, 2023
2 parents 92dce1f + edba4d2 commit 397bf79
Showing 1 changed file with 24 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,24 @@ function Get-TargetResource
$EncryptionRightsDefinitionsValue = Convert-EncryptionRightDefinition -RightsDefinition $entry.Value
}

$entry = $encryption | Where-Object -FilterScript { $_.Key -eq 'donotforward' }
if ($null -ne $entry)
{
$encryptionDoNotForwardValue = [Boolean]::Parse($entry.Value)
}

$entry = $encryption | Where-Object -FilterScript { $_.Key -eq 'encryptonly' }
if ($null -ne $entry)
{
$encryptionEncryptOnlyValue = [Boolean]::Parse($entry.Value)
}

$entry = $encryption | Where-Object -FilterScript { $_.Key -eq 'promptuser' }
if ($null -ne $entry)
{
$encryptionPromptUserValue = [Boolean]::Parse($entry.Value)
}

# Watermark
$entry = $watermark | Where-Object -FilterScript { $_.Key -eq 'disabled' }
if ($null -ne $entry)
Expand Down Expand Up @@ -430,19 +448,19 @@ function Get-TargetResource
$entry = $protectsite | Where-Object -FilterScript { $_.Key -eq 'allowfullaccess' }
if ($null -ne $entry)
{
$siteAndGroupAllowFullAccess = -not [Boolean]::Parse($entry.Value)
$siteAndGroupAllowFullAccess = [Boolean]::Parse($entry.Value)
}

$entry = $protectsite | Where-Object -FilterScript { $_.Key -eq 'allowlimitedaccess' }
if ($null -ne $entry)
{
$siteAndGroupAllowLimitedAccess = -not [Boolean]::Parse($entry.Value)
$siteAndGroupAllowLimitedAccess = [Boolean]::Parse($entry.Value)
}

$entry = $protectsite | Where-Object -FilterScript { $_.Key -eq 'blockaccess' }
if ($null -ne $entry)
{
$siteAndGroupBlockAccess = -not [Boolean]::Parse($entry.Value)
$siteAndGroupBlockAccess = [Boolean]::Parse($entry.Value)
}

$result = @{
Expand Down Expand Up @@ -486,11 +504,11 @@ function Get-TargetResource
ContentType = $currentContentType
#EncryptionAipTemplateScopes = $label.EncryptionAipTemplateScopes
EncryptionContentExpiredOnDateInDaysOrNever = $contentExpiredOnDateValue
EncryptionDoNotForward = ($encryption | Where-Object { $_.Key -eq 'donotforward' }).Value
EncryptionEncryptOnly = ($encryption | Where-Object { $_.Key -eq 'encryptonly' }).Value
EncryptionDoNotForward = $encryptionDoNotForwardValue
EncryptionEncryptOnly = $encryptionEncryptOnlyValue
EncryptionEnabled = $encryptionEnabledValue
EncryptionOfflineAccessDays = $offlineAccessDaysValue
EncryptionPromptUser = ($encryption | Where-Object { $_.Key -eq 'promptuser' }).Value
EncryptionPromptUser = $encryptionPromptUserValue
EncryptionProtectionType = $protectionTypeValue
EncryptionRightsDefinitions = $EncryptionRightsDefinitionsValue
EncryptionRightsUrl = ($encryption | Where-Object { $_.Key -eq 'doublekeyencryptionurl' }).Value
Expand Down

0 comments on commit 397bf79

Please sign in to comment.