File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -328,7 +328,8 @@ pub async fn is_visible_collection(
328328 collection_data : & Collection ,
329329 user_option : & Option < User > ,
330330) -> Result < bool , ApiError > {
331- let mut authorized = !collection_data. status . is_hidden ( ) ;
331+ let mut authorized = !collection_data. status . is_hidden ( )
332+ && !collection_data. projects . is_empty ( ) ;
332333 if let Some ( user) = & user_option {
333334 if !authorized
334335 && ( user. role . is_mod ( ) || user. id == collection_data. user_id . into ( ) )
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ pub struct CollectionCreateData {
5050 #[ validate( length( min = 3 , max = 255 ) ) ]
5151 /// A short description of the collection.
5252 pub description : Option < String > ,
53- #[ validate( length( max = 32 ) ) ]
53+ #[ validate( length( max = 1024 ) ) ]
5454 #[ serde( default = "Vec::new" ) ]
5555 /// A list of initial projects to use with the created collection
5656 pub projects : Vec < String > ,
You can’t perform that action at this time.
0 commit comments