Fix #95 #626 #853 #1278 display login form if board action is not permitted and the user is not logged in

This commit is contained in:
Kijin Sung 2022-12-19 20:41:36 +09:00
parent 539b548509
commit b1b25cac40
2 changed files with 57 additions and 38 deletions

View file

@ -277,9 +277,9 @@ class ModuleObject extends BaseObject
}
// Check permission
if($this->checkPermission($grant) !== true)
if(!$this->checkPermission($grant, $this->user))
{
$this->stop('msg_not_permitted_act');
$this->stop($this->user->isMember() ? 'msg_not_permitted_act' : 'msg_not_logged');
return false;
}
}
@ -293,9 +293,9 @@ class ModuleObject extends BaseObject
$grant = ModuleModel::getInstance()->getGrant($this->module_info, $this->user, $this->xml_info);
// Check permission
if($this->checkPermission($grant) !== true)
if(!$this->checkPermission($grant, $this->user))
{
$this->stop('msg_not_permitted_act');
$this->stop($this->user->isMember() ? 'msg_not_permitted_act' : 'msg_not_logged');
return false;
}
}
@ -357,7 +357,7 @@ class ModuleObject extends BaseObject
// If permission is 'member', check logged-in
else if($permission == 'member')
{
if(Context::get('is_logged'))
if($member_info->member_srl)
{
return true;
}