mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-11 21:12:15 +09:00
Apply manager scopes to Document and Comment isGranted()
This commit is contained in:
parent
8c6beff859
commit
8d8380a366
2 changed files with 2 additions and 2 deletions
|
|
@ -126,7 +126,7 @@ class CommentItem extends BaseObject
|
||||||
}
|
}
|
||||||
|
|
||||||
$grant = ModuleModel::getGrant(ModuleModel::getModuleInfoByModuleSrl($this->get('module_srl')), $logged_info);
|
$grant = ModuleModel::getGrant(ModuleModel::getModuleInfoByModuleSrl($this->get('module_srl')), $logged_info);
|
||||||
if ($grant->manager)
|
if ($grant->manager && $grant->can('moderate:comment'))
|
||||||
{
|
{
|
||||||
return $this->grant_cache = true;
|
return $this->grant_cache = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,7 @@ class DocumentItem extends BaseObject
|
||||||
}
|
}
|
||||||
|
|
||||||
$grant = ModuleModel::getGrant(ModuleModel::getModuleInfoByModuleSrl($this->get('module_srl')), $logged_info);
|
$grant = ModuleModel::getGrant(ModuleModel::getModuleInfoByModuleSrl($this->get('module_srl')), $logged_info);
|
||||||
if ($grant->manager)
|
if ($grant->manager && $grant->can('moderate:document'))
|
||||||
{
|
{
|
||||||
return $this->grant_cache = true;
|
return $this->grant_cache = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue