ACL method and reports

This commit is contained in:
mdecimus
2025-03-27 19:40:12 +01:00
parent 3f825aaafd
commit a5e6f77b26
24 changed files with 742 additions and 125 deletions

View File

@@ -34,30 +34,12 @@ impl FileHierarchy for Server {
.get(&account_id)
.filter(|x| x.modseq == change_id)
{
let c = println!(
"Hierarchy: {:?}",
files
.files
.iter()
.map(|f| f.name.clone())
.collect::<Vec<_>>()
);
Ok(files)
} else {
let mut files = build_file_hierarchy(self, account_id).await?;
files.modseq = change_id;
let files = Arc::new(files);
self.inner.cache.files.insert(account_id, files.clone());
let c = println!(
"Hierarchy: {:?}",
files
.files
.iter()
.map(|f| f.name.clone())
.collect::<Vec<_>>()
);
Ok(files)
}
}
@@ -68,9 +50,6 @@ async fn build_file_hierarchy(server: &Server, account_id: u32) -> trc::Result<F
.fetch_folders::<FileNode>(account_id, Collection::FileNode)
.await
.caused_by(trc::location!())?;
/*.format(|f| {
f.name = percent_encoding::utf8_percent_encode(&f.name, NON_ALPHANUMERIC).to_string();
});*/
let mut files = Files {
files: IdBimap::with_capacity(list.len()),
size: std::mem::size_of::<Files>() as u64,