v0.10.302 #2

Merged
didirus merged 289 commits from feature-clean into beta 2025-07-08 15:00:09 +00:00
2 changed files with 3 additions and 2 deletions
Showing only changes of commit 365367dd16 - Show all commits

View File

@@ -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())

View File

@@ -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>,