Fix #1827 unnecessary use of $is_admin when getting document or comment

This commit is contained in:
Kijin Sung 2021-11-26 02:07:08 +09:00
parent 42442aeef7
commit 97f28141ae
3 changed files with 10 additions and 10 deletions

View file

@ -118,7 +118,7 @@ class boardController extends board
}
// Update if the document already exists.
$oDocument = DocumentModel::getDocument($obj->document_srl, $this->grant->manager);
$oDocument = DocumentModel::getDocument($obj->document_srl);
if($oDocument->isExists())
{
if(!$oDocument->isGranted())
@ -462,7 +462,7 @@ class boardController extends board
}
else
{
$comment = CommentModel::getComment($obj->comment_srl, $this->grant->manager);
$comment = CommentModel::getComment($obj->comment_srl);
if($this->module_info->protect_update_comment === 'Y' && $this->grant->manager == false)
{
$childs = CommentModel::getChildComments($obj->comment_srl);
@ -562,7 +562,7 @@ class boardController extends board
$instant_delete = Context::get('instant_delete');
}
$comment = CommentModel::getComment($comment_srl, $this->grant->manager);
$comment = CommentModel::getComment($comment_srl);
if (!$comment || !$comment->isExists())
{
throw new Rhymix\Framework\Exceptions\TargetNotFound;