Fix permissions problems when move to the trash.

This commit is contained in:
BJRambo 2016-10-01 17:54:44 +09:00
parent 2108d96578
commit 81f9727fd9
2 changed files with 5 additions and 2 deletions

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

@ -18,9 +18,13 @@ class trashAdminController extends trash
function insertTrash($obj)
{
if(!Context::get('is_logged'))
{
$trash_array = unserialize($obj->serializedObject);
if($_SERVER['REMOTE_ADDR'] !== $trash_array['ipaddress'])
{
return new Object(-1, 'msg_not_permitted');
}
}
$logged_info = Context::get('logged_info');