Merge branch '2.4' of https://github.com/MISP/MISP into 2.4

pull/762/merge
iglocska 2015-12-29 01:17:18 +01:00
commit 3df592ceae
4 changed files with 6 additions and 6 deletions

2
PyMISP

@ -1 +1 @@
Subproject commit 205baa2f65908912c109406c8084a44d9d1bc06a
Subproject commit f968f43bd9cfafa239151cbc04fd207a5d3a11e8

View File

@ -1393,7 +1393,7 @@ class EventsController extends AppController {
'fields' => array('id', 'progress'),
'conditions' => array(
'job_type' => 'cache_' . $k,
'org' => $useOrg
'org_id' => $useOrg
),
'order' => array('Job.id' => 'desc')
));

View File

@ -70,7 +70,7 @@ class JobsController extends AppController {
$progress = $this->Job->find('first', array(
'conditions' => array(
'job_type' => $type,
'org' => $org
'org_id' => $org
),
'fields' => array('id', 'progress'),
'order' => array('Job.id' => 'desc'),

View File

@ -261,13 +261,13 @@ class TemplatesController extends AppController {
$event = $this->Event->find('first', array(
'conditions' => array('id' => $event_id),
'recursive' => -1,
'fields' => array('id', 'orgc', 'distribution'),
'fields' => array('id', 'orgc_id', 'distribution'),
));
if (empty($event)) throw new MethodNotAllowedException('Event not found or you are not authorised to edit it.');
if (empty($template)) throw new MethodNotAllowedException('Template not found or you are not authorised to edit it.');
if (!$this->_isSiteAdmin()) {
if ($event['Event']['orgc'] != $this->Auth->user('Organisation')['name']) throw new MethodNotAllowedException('Event not found or you are not authorised to edit it.');
if ($event['Event']['orgc_id'] != $this->Auth->user('Organisation')['name']) throw new MethodNotAllowedException('Event not found or you are not authorised to edit it.');
if ($template['Template']['org'] != $this->Auth->user('Organisation')['name'] && !$template['Template']['share']) throw new MethodNotAllowedException('Template not found or you are not authorised to use it.');
}
@ -305,7 +305,7 @@ class TemplatesController extends AppController {
$event = $this->Event->find('first', array(
'conditions' => array('id' => $event_id),
'recursive' => -1,
'fields' => array('id', 'orgc', 'distribution', 'published'),
'fields' => array('id', 'orgc_id', 'distribution', 'published'),
'contain' => 'EventTag',
));
if (empty($event)) throw new MethodNotAllowedException('Event not found or you are not authorised to edit it.');