Update document, comment, file modules to throw exceptions

This commit is contained in:
Kijin Sung 2018-09-05 23:55:50 +09:00
parent 5be05dd875
commit ad00ac800b
11 changed files with 142 additions and 110 deletions

View file

@ -45,7 +45,7 @@ class fileModel extends file
$oComment = $oCommentModel->getComment($upload_target_srl);
if($oComment->isExists() && !$oComment->isAccessible())
{
return $this->setError('msg_not_permitted');
throw new Rhymix\Framework\Exceptions\NotPermitted;
}
$oDocument = $oDocumentModel->getDocument($oComment->get('document_srl'));
@ -54,7 +54,7 @@ class fileModel extends file
// document 권한 확인
if($oDocument->isExists() && !$oDocument->isAccessible())
{
return $this->setError('msg_not_permitted');
throw new Rhymix\Framework\Exceptions\NotPermitted;
}
// 모듈 권한 확인
@ -63,7 +63,7 @@ class fileModel extends file
$grant = $oModuleModel->getGrant($oModuleModel->getModuleInfoByModuleSrl($oDocument->get('module_srl')), $logged_info);
if(!$grant->access)
{
return $this->setError('msg_not_permitted');
throw new Rhymix\Framework\Exceptions\NotPermitted;
}
}