feat(username|email): pass1: normalize auth.user data

username: now optional, if defined 2..64 chars
    password: now optional (no mode __NO_PASSWORD...__)
    oidc: now optional

    important: if need Nextcloud, username must be defined
This commit is contained in:
Edouard Vanbelle
2026-06-02 21:21:24 +02:00
parent 37b1c2703b
commit d57a50d056
17 changed files with 418 additions and 247 deletions
+5 -2
View File
@@ -621,7 +621,7 @@ impl FolderService {
pub async fn ensure_home_folder(
&self,
user_id: Uuid,
username: &str,
username: Option<&str>,
) -> Result<bool, DomainError> {
let existing = self
.folder_storage
@@ -637,7 +637,10 @@ impl FolderService {
return Ok(false);
}
let folder_name = format!("My Folder - {}", username);
let folder_name = match username {
Some(u) => format!("My Folder - {}", u),
None => format!("My Folder - {}", user_id),
};
self.folder_storage
.create_home_folder(user_id, folder_name.clone())
.await