feat: user tombstone and retired usernames
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user