Prevent banned users from sending messages.

This commit is contained in:
flash 2024-02-02 01:59:21 +00:00
parent b80151583e
commit cca016ba10

View file

@ -41,7 +41,8 @@ class MessagesRoutes extends RouteHandler {
if(!$globalPerms->check(Perm::G_MESSAGES_VIEW))
return 403;
$this->canSendMessages = $globalPerms->check(Perm::G_MESSAGES_SEND);
$this->canSendMessages = $globalPerms->check(Perm::G_MESSAGES_SEND)
&& !$this->usersCtx->hasActiveBan($this->authInfo->getUserInfo());
if($request->getMethod() === 'POST' && $request->isFormContent()) {
$content = $request->getContent();