mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
Add an option to check the permissions of modules linked to documents or comments
This commit is contained in:
parent
7c963d0ac3
commit
0dd567bc00
3 changed files with 21 additions and 3 deletions
|
|
@ -188,13 +188,22 @@ class commentItem extends BaseObject
|
|||
}
|
||||
}
|
||||
|
||||
function isAccessible()
|
||||
function isAccessible($strict = false)
|
||||
{
|
||||
if(!$this->isExists())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($strict)
|
||||
{
|
||||
$grant = ModuleModel::getGrant(ModuleModel::getModuleInfoByModuleSrl($this->get('module_srl')), Context::get('logged_info'));
|
||||
if (isset($grant->list) && isset($grant->view) && ($grant->list !== true || $grant->view !== true))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_SESSION['accessible'][$this->comment_srl]) && $_SESSION['accessible'][$this->comment_srl] === $this->get('last_update'))
|
||||
{
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue