Merge pull request #642 from EdouardVanbelle/fix/merge-is-favorite-and-mount

This commit is contained in:
Dionisio Pozo
2026-07-22 13:03:35 +02:00
committed by GitHub
3 changed files with 18 additions and 1 deletions
Generated
+1 -1
View File
@@ -4322,7 +4322,7 @@ dependencies = [
[[package]]
name = "oxicloud"
version = "0.8.2"
version = "0.8.7"
dependencies = [
"accept-language",
"aes-gcm",
+11
View File
@@ -67,6 +67,11 @@ pub fn mount_folder_dto(cfg: &MountConfig, parent_id: &str, stat: &MountStat) ->
category: Arc::from("Folder"),
created_by: Some(cfg.owner_id),
updated_by: Some(cfg.owner_id),
// Mount entries carry synthetic `ext:*` ids that don't exist in
// `auth.user_favorites` or `storage.role_grants`, so both flags
// are always false — they can't be favorited or grant-listed.
is_favorite: false,
is_shared: false,
}
}
@@ -88,6 +93,8 @@ pub fn mount_entry_folder_dto(cfg: &MountConfig, parent_id: &str, entry: &MountE
category: Arc::from("Folder"),
created_by: Some(cfg.owner_id),
updated_by: Some(cfg.owner_id),
is_favorite: false,
is_shared: false,
}
}
@@ -115,6 +122,8 @@ pub fn mount_entry_file_dto(cfg: &MountConfig, parent_id: &str, entry: &MountEnt
etag: virtual_file_etag(entry.size, entry.modified_at),
created_by: Some(cfg.owner_id),
updated_by: Some(cfg.owner_id),
is_favorite: false,
is_shared: false,
}
}
@@ -141,5 +150,7 @@ pub fn mount_file_dto(cfg: &MountConfig, parent_id: &str, stat: &MountStat) -> F
etag: virtual_file_etag(stat.size, stat.modified_at),
created_by: Some(cfg.owner_id),
updated_by: Some(cfg.owner_id),
is_favorite: false,
is_shared: false,
}
}
@@ -686,6 +686,10 @@ fn mount_entry_to_item(
category: Arc::from("Folder"),
created_by: Some(cfg.owner_id),
updated_by: Some(cfg.owner_id),
// Mount entries use synthetic `ext:*` ids — no favorites /
// grants rows can ever key against them.
is_favorite: false,
is_shared: false,
};
FolderResourceItemDto {
resource_type: ResourceTypeDto::Folder,
@@ -713,6 +717,8 @@ fn mount_entry_to_item(
etag: virtual_file_etag(entry.size, entry.modified_at),
created_by: Some(cfg.owner_id),
updated_by: Some(cfg.owner_id),
is_favorite: false,
is_shared: false,
};
FolderResourceItemDto {
resource_type: ResourceTypeDto::File,