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

@ -29,7 +29,7 @@ class documentView extends document
$document_srl = Context::get('document_srl');
// Creates an object for displaying the selected document
$oDocument = DocumentModel::getDocument($document_srl, $this->grant->manager);
$oDocument = DocumentModel::getDocument($document_srl);
if(!$oDocument->isExists()) throw new Rhymix\Framework\Exceptions\TargetNotFound;
// Check permissions
if(!$oDocument->isAccessible()) throw new Rhymix\Framework\Exceptions\NotPermitted;
@ -232,7 +232,7 @@ class documentView extends document
}
// Creates an object for displaying the selected document
$oDocument = DocumentModel::getDocument($document_srl, $this->grant->manager, FALSE);
$oDocument = DocumentModel::getDocument($document_srl, false, false);
if(!$oDocument->isExists())
{
throw new Rhymix\Framework\Exceptions\TargetNotFound;