mirror of https://github.com/MISP/MISP
fix: Fixed a bug where normal users couldn't add object references
- as reported by @deralexxxpull/2509/head
parent
1770a501ab
commit
12b1c354fa
|
@ -34,10 +34,7 @@ class ObjectReferencesController extends AppController {
|
|||
)
|
||||
)
|
||||
));
|
||||
if (!$this->userRole['perm_add']) {
|
||||
throw new MethodNotAllowedException('You don\'t have the required permissions to add object reference.');
|
||||
}
|
||||
if (empty($object) || (!$this->_isSiteAdmin() && $object['Event']['orgc_id'] != $this->Auth->user('orgc_id'))) {
|
||||
if (empty($object) || (!$this->_isSiteAdmin() && $object['Event']['orgc_id'] != $this->Auth->user('org_id'))) {
|
||||
throw new MethodNotAllowedException('Invalid object.');
|
||||
}
|
||||
$this->set('objectId', $objectId);
|
||||
|
|
Loading…
Reference in New Issue