pub fn document_permission_allows( work_path: &Path, doc_id: u64, op: Operation, identity: Option<&[u8; 16]>, ) -> Result<bool>