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§
- File
Access Ctx - Context describing the subject requesting file access
- File
Access Result - Result of checking file access
Enums§
- File
Access Error - Error type for file access checks
- Scope
Check - Result of checking whether a file is allowed by scope
Functions§
- check_
file_ access_ with_ scope - Check file access and return file view with access level
- check_
scope_ allows_ create - Check if a scoped token allows write access for file creation.
- check_
scope_ allows_ file - Check if a file operation is allowed by scope.
- check_
share_ for_ file - Check if a user has share access to a file — either a direct share entry on the file itself or an inherited share from an ancestor folder.
- 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
- walk_
parent_ chain_ for_ share - Walk the parent chain of a file to find an inherited share entry.