mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-11 04:52:14 +09:00
#398 블로그API에서 파일첨부 권한이 변경된 것을 적용하여 문제 해결
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3660 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
27dbf11b67
commit
ea4451e8ac
1 changed files with 15 additions and 2 deletions
|
|
@ -119,8 +119,21 @@
|
||||||
// 파일 업로드
|
// 파일 업로드
|
||||||
case 'metaWeblog.newMediaObject' :
|
case 'metaWeblog.newMediaObject' :
|
||||||
// 파일 업로드 권한 체크
|
// 파일 업로드 권한 체크
|
||||||
if(!$this->grant->fileupload) {
|
$oFileModel = &getModel('file');
|
||||||
printContent( getXmlRpcFailure(1, 'no permission') );
|
$file_module_config = $oFileModel->getFileModuleConfig($this->module_srl);
|
||||||
|
if(is_array($file_module_config->download_grant) && count($file_module_config->download_grant)>0) {
|
||||||
|
$logged_info = Context::get('logged_info');
|
||||||
|
if($logged_info->is_admin != 'Y') {
|
||||||
|
$is_permitted = false;
|
||||||
|
for($i=0;$i<count($file_module_config->download_grant);$i++) {
|
||||||
|
$group_srl = $file_module_config->download_grant[$i];
|
||||||
|
if($logged_info->group_list[$group_srl]) {
|
||||||
|
$is_permitted = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!$is_permitted) printContent( getXmlRpcFailure(1, 'no permission') );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$fileinfo = $params[3]->value->struct->member;
|
$fileinfo = $params[3]->value->struct->member;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue