mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
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:
parent
539b548509
commit
b1b25cac40
2 changed files with 57 additions and 38 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue