mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-14 12:46:49 +00:00
feat: Prevent suspended users performing room changes
Prevents kicks, bans, unbans, and alias modification
This commit is contained in:
1 parent
d0548ec064
commit
90180916eb
3 files changed
+23
-2
No files matched your search
@@ -128,6 +128,9 @@ pub(crate) async fn set_room_visibility_route(
|
||||
// Return 404 if the room doesn't exist
|
||||
return Err!(Request(NotFound("Room not found")));
|
||||
}
|
||||
if services.users.is_suspended(sender_user).await? {
|
||||
return Err!(Request(UserSuspended("You cannot perform this action while suspended.")));
|
||||
}
|
||||
|
||||
if services
|
||||
.users
|
||||
|
||||
Reference in new issue
Block a user