Sha256: 3cbc5265bcbb645c8e8f39f0be1272f5e81f5d365633f8930646c4c845c315b5

Contents?: true

Size: 366 Bytes

Versions: 508

Compression:

Stored size: 366 Bytes

Contents

function CheckFileAccessRules
{
  param($path, $identity, $rules)
  
  $accessRules = @((Get-Acl $path).access | Where-Object {$_.AccessControlType -eq 'Allow' -and $_.IdentityReference -eq $identity })
  $match = @($accessRules | Where-Object {($_.FileSystemRights.ToString().Split(',') | % {$_.trim()} | ? {$rules -contains $_}) -ne $null})
  $match.count -gt 0
}

Version data entries

508 entries across 508 versions & 4 rubygems

Version Path
specinfra-2.71.0 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.70.2 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.70.1 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.70.0 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.69.0 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.68.2 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.68.1 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.68.0 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.67.10 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.67.9 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.67.8 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.67.7 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.67.6 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.67.5 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.67.3 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.67.2 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.67.1 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.67.0 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.66.9 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.66.8 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1