Skip to main content

check_scope_allows_file

Function check_scope_allows_file 

Source
pub fn check_scope_allows_file(
    scope: Option<&str>,
    file_id: &str,
    root_id: Option<&str>,
) -> ScopeCheck
Expand description

Check if a file operation is allowed by scope.

Returns ScopeCheck::NoScope when there is no scope restriction, ScopeCheck::Allowed(level) when the file is within scope, or ScopeCheck::Denied when the file is outside scope.