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.91.0 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.90.1 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.90.0 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.89.0 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.88.2 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.88.1 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.88.0 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.87.2 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.87.1 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.87.0 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.86.0 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.85.1 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.85.0 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.84.1 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.84.0 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.83.4 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.83.3 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.83.2 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.83.1 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1
specinfra-2.83.0 lib/specinfra/backend/powershell/support/check_file_access_rules.ps1