fix: [ACL] Added ACL for the new cache searches

pull/4416/head
iglocska 2019-04-01 16:16:16 +02:00
parent ab858d5f17
commit dc39255be5
2 changed files with 4 additions and 0 deletions

View File

@ -177,6 +177,7 @@ class ACLComponent extends Component
'index' => array('*'),
'previewEvent' => array('*'),
'previewIndex' => array('*'),
'searchCaches' => array('*'),
'toggleSelected' => array('perm_site_admin'),
'view' => array('*'),
),

View File

@ -951,6 +951,9 @@ class FeedsController extends AppController
public function searchCaches()
{
if (!$this->_isSiteAdmin() && !$this->Auth->user('org_id') == Configure::read('MISP.host_org_id')) {
throw NotAllowedException('You don\'t have access to this feature.');
}
if (isset($this->passedArgs['pages'])) {
$currentPage = $this->passedArgs['pages'];
} else {