mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
#2126 문서 스크랩 기능에서 게시판의 목록 보기 권한과 상담 기능 사용 시 권한 확인
This commit is contained in:
parent
3b557978e9
commit
7d222acdfa
1 changed files with 19 additions and 1 deletions
|
|
@ -140,12 +140,30 @@ class memberController extends member
|
|||
}
|
||||
|
||||
// 모듈 권한 확인
|
||||
$grant = $oModuleModel->getGrant($oModuleModel->getModuleInfoByModuleSrl($oDocument->get('module_srl')), $logged_info);
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($oDocument->get('module_srl'));
|
||||
$grant = $oModuleModel->getGrant($module_info, $logged_info);
|
||||
|
||||
if(!$grant->access)
|
||||
{
|
||||
return new Object(-1, 'msg_not_permitted');
|
||||
}
|
||||
|
||||
// 게시판 모듈에서 글 목록 보기 권한이 없으면 스크랩 제한
|
||||
if($module_info->module === 'board' && isset($grant->list) && !$grant->list)
|
||||
{
|
||||
return new Object(-1, 'msg_not_permitted');
|
||||
}
|
||||
|
||||
// 게시판 모듈에서 상담 기능 사용 시 권한이 없는 게시물(타인의 게시물) 스크랩 제한
|
||||
if($module_info->module === 'board' &&
|
||||
$module_info->consultation === 'Y' &&
|
||||
isset($grant->consultation_read) &&
|
||||
!$grant->consultation_read && !$oDocument->isGranted()
|
||||
)
|
||||
{
|
||||
return new Object(-1, 'msg_not_permitted');
|
||||
}
|
||||
|
||||
// Variables
|
||||
$args = new stdClass();
|
||||
$args->document_srl = $document_srl;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue