Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/labrinth/src/auth/checks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,8 @@ pub async fn is_visible_collection(
collection_data: &Collection,
user_option: &Option<User>,
) -> Result<bool, ApiError> {
let mut authorized = !collection_data.status.is_hidden();
let mut authorized = !collection_data.status.is_hidden()
&& !collection_data.projects.is_empty();
if let Some(user) = &user_option {
if !authorized
&& (user.role.is_mod() || user.id == collection_data.user_id.into())
Expand Down
2 changes: 1 addition & 1 deletion apps/labrinth/src/routes/v3/collections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub struct CollectionCreateData {
#[validate(length(min = 3, max = 255))]
/// A short description of the collection.
pub description: Option<String>,
#[validate(length(max = 32))]
#[validate(length(max = 1024))]
#[serde(default = "Vec::new")]
/// A list of initial projects to use with the created collection
pub projects: Vec<String>,
Expand Down
Loading