mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-10 19:42:50 +02:00
feat: Record metadata about user suspensions
This commit is contained in:
parent
13e17d52e0
commit
ecc6fda98b
3 changed files with 42 additions and 22 deletions
|
@ -238,7 +238,11 @@ pub(super) async fn suspend(&self, user_id: String) -> Result {
|
|||
if self.services.users.is_admin(&user_id).await {
|
||||
return Err!("Admin users cannot be suspended.");
|
||||
}
|
||||
self.services.users.suspend_account(&user_id).await;
|
||||
// TODO: Record the actual user that sent the suspension where possible
|
||||
self.services
|
||||
.users
|
||||
.suspend_account(&user_id, self.services.globals.server_user.as_ref())
|
||||
.await;
|
||||
|
||||
self.write_str(&format!("User {user_id} has been suspended."))
|
||||
.await
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue