Fix #654 don't display send message link if not permitted for current user

This commit is contained in:
Kijin Sung 2016-12-16 23:43:46 +09:00
parent cd96da156c
commit c900f49d72
2 changed files with 8 additions and 0 deletions

View file

@ -835,6 +835,10 @@ class communicationController extends communication
{ {
return new Object(); return new Object();
} }
if(!$oCommunicationModel->checkGrant($config->grant_send))
{
return new Object();
}
$mid = Context::get('cur_mid'); $mid = Context::get('cur_mid');
$member_srl = Context::get('target_srl'); $member_srl = Context::get('target_srl');

View file

@ -178,6 +178,10 @@ class communicationView extends communication
{ {
return $this->stop('msg_invalid_request'); return $this->stop('msg_invalid_request');
} }
if(!getModel('communication')->checkGrant($this->config->grant_send))
{
return $this->stop('msg_not_permitted');
}
// Error appears if not logged-in // Error appears if not logged-in
if(!Context::get('is_logged')) if(!Context::get('is_logged'))