fix: 7.2.5 aligned with test-template

This commit is contained in:
DrIOS
2024-05-28 14:43:30 -05:00
parent 6930673209
commit deec4c4f5e

View File

@@ -1,11 +1,14 @@
function Test-SharePointGuestsItemSharing {
[CmdletBinding()]
param (
# Aligned
# Define your parameters here
)
begin {
# Initialization code
# Dot source the class script if necessary
#. .\source\Classes\CISAuditResult.ps1
# Initialization code, if needed
$auditResult = [CISAuditResult]::new()
}
@@ -19,7 +22,6 @@ function Test-SharePointGuestsItemSharing {
$auditResult.CISControlVer = "v8"
$auditResult.CISControl = "3.3"
$auditResult.CISDescription = "Configure Data Access Control Lists"
$auditResult.Rec = "7.2.5"
$auditResult.ELevel = "E3"
$auditResult.ProfileLevel = "L2"
@@ -27,7 +29,6 @@ function Test-SharePointGuestsItemSharing {
$auditResult.IG2 = $true
$auditResult.IG3 = $true
$auditResult.RecDescription = "Ensure that SharePoint guest users cannot share items they don't own"
$auditResult.Result = $isGuestResharingPrevented
$auditResult.Details = "PreventExternalUsersFromResharing: $isGuestResharingPrevented"
$auditResult.FailureReason = if (-not $isGuestResharingPrevented) { "Guest users can reshare items they don't own." } else { "N/A" }