mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Merge pull request #21 from nyeholt/master
BUGFIX: Fixed issue where folderID wasn't being correctly resolved from request, thus making file upload permissions only ever checked against the 'root' folder
This commit is contained in:
commit
8e07c967ed
@ -103,7 +103,8 @@ JS
|
||||
Requirements::css(CMS_DIR . "/css/cms_left.css");
|
||||
Requirements::css(CMS_DIR . "/css/cms_right.css");
|
||||
|
||||
if(isset($data['ID']) && $data['ID'] != 'root') $folder = DataObject::get_by_id("Folder", $data['ID']);
|
||||
$id = (int) $this->request->param('ID');
|
||||
if($id) $folder = DataObject::get_by_id("Folder", $id);
|
||||
else $folder = singleton('Folder');
|
||||
|
||||
return array( 'CanUpload' => $folder->canEdit());
|
||||
|
Loading…
Reference in New Issue
Block a user