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

View File

@@ -92,7 +92,7 @@ impl CollectionStatus {
}
}
// Project pages + info cannot be viewed
// Collection pages + info cannot be viewed
pub fn is_hidden(&self) -> bool {
match self {
CollectionStatus::Rejected => true,
@@ -103,6 +103,11 @@ impl CollectionStatus {
}
}
// Collection can be displayed in on user page
pub fn is_searchable(&self) -> bool {
matches!(self, CollectionStatus::Listed)
}
pub fn is_approved(&self) -> bool {
match self {
CollectionStatus::Listed => true,