Hopefully fix collection visibility once and for all (#4070)

* Hopefully fix collection visibility once and for all

Follow up to #3408 and #3864

* Use same unlisted approach for collections as is used for projects
This commit is contained in:
Emma Alexia
2025-07-27 14:23:49 -04:00
committed by GitHub
parent ff88724d01
commit b8982a6d17
4 changed files with 34 additions and 27 deletions
+3 -2
View File
@@ -163,7 +163,8 @@ pub async fn collections_get(
.ok();
let collections =
filter_visible_collections(collections_data, &user_option).await?;
filter_visible_collections(collections_data, &user_option, false)
.await?;
Ok(HttpResponse::Ok().json(collections))
}
@@ -192,7 +193,7 @@ pub async fn collection_get(
.ok();
if let Some(data) = collection_data {
if is_visible_collection(&data, &user_option).await? {
if is_visible_collection(&data, &user_option, false).await? {
return Ok(HttpResponse::Ok().json(Collection::from(data)));
}
}