Prevent banned users from sending messages.
This commit is contained in:
parent
b80151583e
commit
cca016ba10
1 changed files with 2 additions and 1 deletions
|
@ -41,7 +41,8 @@ class MessagesRoutes extends RouteHandler {
|
||||||
if(!$globalPerms->check(Perm::G_MESSAGES_VIEW))
|
if(!$globalPerms->check(Perm::G_MESSAGES_VIEW))
|
||||||
return 403;
|
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()) {
|
if($request->getMethod() === 'POST' && $request->isFormContent()) {
|
||||||
$content = $request->getContent();
|
$content = $request->getContent();
|
||||||
|
|
Loading…
Reference in a new issue