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.66.7 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.66.6 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.66.5 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.66.4 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.66.3 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.66.2 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.66.1 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.66.0 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.65.0 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.64.0 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.63.3 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.63.2 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.63.1 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.63.0 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.62.0 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.61.3 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.61.2 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.61.1 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.61.0 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.60.4 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1