pub async fn get_access_level(
app: &App,
tn_id: TnId,
file_id: &str,
owner_id_tag: &str,
ctx: &FileAccessCtx<'_>,
inherited_share: Option<AccessLevel>,
) -> AccessLevelExpand description
Get access level for a user on a file
Determines access level based on:
- Ownership — owner has Admin access
- Direct
share_entriesgrant on this file, then the caller-suppliedinherited_share, then a parent-chain walk for a folder-inherited grant - Role-based access — tenant-owned files only: leader → Admin, moderator/contributor → Write, any role → Read
- FSHR action issued by the file’s owner — ADMIN → Admin, WRITE → Write, COMMENT → Comment,
DEL → None (a revocation is not a grant), other sub-types → Read (see [
fshr_grant_level]) - No access — returns None