From deec4c4f5e56b90f0d63b4b345c0beb1a669c059 Mon Sep 17 00:00:00 2001 From: DrIOS <58635327+DrIOSX@users.noreply.github.com> Date: Tue, 28 May 2024 14:43:30 -0500 Subject: [PATCH] fix: 7.2.5 aligned with test-template --- source/tests/Test-SharePointGuestsItemSharing.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/tests/Test-SharePointGuestsItemSharing.ps1 b/source/tests/Test-SharePointGuestsItemSharing.ps1 index ac50ac6..bff9180 100644 --- a/source/tests/Test-SharePointGuestsItemSharing.ps1 +++ b/source/tests/Test-SharePointGuestsItemSharing.ps1 @@ -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" }