pub fn check_scope_allows_create(
scope: Option<&str>,
root_id: Option<&str>,
) -> Result<(), Error>Expand description
Check if a scoped token allows write access for file creation.
For scoped tokens, file creation is only allowed when:
- The scope grants Write access
- The file has a root_id that matches the scope’s file_id (i.e., the new file is a child in the scoped document tree)
Returns Ok(()) if allowed, Err if denied.