Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 7fef18b

Browse files
committed
BUG: refs #0460. We weren't doing a policy check when viewing a folder :(
1 parent 82deca2 commit 7fef18b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

core/controllers/FolderController.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,15 @@ public function viewAction()
105105
$header = "";
106106
if(!isset($folder_id))
107107
{
108-
throw new Zend_Exception("Please set the folderId.");
108+
throw new Zend_Exception('Please set the folderId.');
109109
}
110110
elseif($folder === false)
111111
{
112-
throw new Zend_Exception("The folder doesn t exist.");
112+
throw new Zend_Exception('The folder doesn t exist.');
113+
}
114+
elseif(!$this->Folder->policyCheck($folder, $this->userSession->Dao, MIDAS_POLICY_READ))
115+
{
116+
throw new Zend_Exception('Invalid policy: no read access');
113117
}
114118
else
115119
{

0 commit comments

Comments
 (0)