Merge pull request #602 from bjrambo/pr/trash-bug

Fix #583 휴지통 이동시 비회원의 권한 문제 고침.
This commit is contained in:
Johnny 2016-10-04 16:43:42 +09:00 committed by GitHub
commit 9babf41659
4 changed files with 12 additions and 12 deletions

View file

@ -297,10 +297,13 @@ class boardController extends board
if($this->module_info->trash_use == 'Y')
{
// move the trash
$output = $oDocumentController->moveDocumentToTrash($oDocument);
if(!$output->toBool())
if($oDocument->isGranted() === true)
{
return $output;
$output = $oDocumentController->moveDocumentToTrash($oDocument);
if(!$output->toBool())
{
return $output;
}
}
}
else

View file

@ -951,7 +951,6 @@ class documentController extends document
return new Object(-1, 'msg_admin_document_no_move_to_trash');
}
$trash_args->module_srl = $oDocument->get('module_srl');
$obj->module_srl = $oDocument->get('module_srl');
// Cannot throw data from the trash to the trash

View file

@ -1,7 +1,11 @@
<query id="getTrashList" action="select">
<tables>
<table name="trash" alias="T" />
<table name="member" alias="M" />
<table name="member" alias="M" type="left join">
<conditions>
<condition operation="equal" column="T.remover_srl" default="M.member_srl" />
</conditions>
</table>
</tables>
<columns>
<column name="T.*" />
@ -9,8 +13,7 @@
<column name="M.nick_name" />
</columns>
<conditions>
<condition operation="equal" column="T.remover_srl" default="M.member_srl" notnull="notnull" />
<condition operation="in" column="trash_srl" var="trashSrl" filter="number" pipe="and" />
<condition operation="in" column="trash_srl" var="trashSrl" filter="number" />
<condition operation="in" column="origin_module" var="originModule" pipe="and" />
<group pipe="and">
<condition operation="like" column="T.title" var="s_title" />

View file

@ -17,11 +17,6 @@ class trashAdminController extends trash
*/
function insertTrash($obj)
{
if(!Context::get('is_logged'))
{
return new Object(-1, 'msg_not_permitted');
}
$logged_info = Context::get('logged_info');
$oTrashVO = new TrashVO();