Skip to main content

Module file_access

Module file_access 

Source
Expand description

File access level helpers

Provides functions to determine user access levels to files based on:

  • Scoped tokens (file:{file_id}:{R|W} grants Read/Write access)
  • Ownership (owner always has Write access)
  • FSHR action grants (WRITE subtype = Write, otherwise Read)

Structs§

FileAccessCtx
Context describing the subject requesting file access
FileAccessResult
Result of checking file access

Enums§

FileAccessError
Error type for file access checks

Functions§

check_file_access_with_scope
Check file access and return file view with access level
get_access_level
Get access level for a user on a file
get_access_level_with_scope
Get access level for a user on a file, considering scoped tokens