feat: user tombstone and retired usernames

This commit is contained in:
2026-10-26 02:03:36 +01:00
parent bde8040cc3
commit 31f5d5f337
15 changed files with 550 additions and 56 deletions

View File

@@ -314,6 +314,28 @@ impl UserRepository for ProfileWriteRefusingUsers {
"refused".into(),
))
}
async fn mark_deleted(
&self,
id: &domain::value_objects::UserId,
events: &[DomainEvent],
) -> Result<(), domain::errors::DomainError> {
self.0.mark_deleted(id, events).await
}
async fn find_tombstoned_by_id(
&self,
id: &domain::value_objects::UserId,
) -> Result<Option<domain::models::User>, domain::errors::DomainError> {
self.0.find_tombstoned_by_id(id).await
}
async fn is_username_retired(
&self,
u: &domain::value_objects::Username,
) -> Result<bool, domain::errors::DomainError> {
self.0.is_username_retired(u).await
}
async fn count_active_admins(&self) -> Result<u64, domain::errors::DomainError> {
self.0.count_active_admins().await
}
}
#[tokio::test]