mirror of https://github.com/MISP/MISP
Merge branch 'develop' of github.com:MISP/MISP into develop
commit
ca02bf1c4e
|
@ -4320,7 +4320,6 @@ class Event extends AppModel
|
||||||
$jobId
|
$jobId
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->publish($id, $passAlong);
|
return $this->publish($id, $passAlong);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4365,6 +4364,7 @@ class Event extends AppModel
|
||||||
'recursive' => -1,
|
'recursive' => -1,
|
||||||
'conditions' => array('Event.id' => $id)
|
'conditions' => array('Event.id' => $id)
|
||||||
));
|
));
|
||||||
|
|
||||||
if (empty($event)) {
|
if (empty($event)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -4413,6 +4413,7 @@ class Event extends AppModel
|
||||||
$success = $this->executeTrigger('event-publish', $fullEvent[0], $workflowErrors, $logging);
|
$success = $this->executeTrigger('event-publish', $fullEvent[0], $workflowErrors, $logging);
|
||||||
if (empty($success)) {
|
if (empty($success)) {
|
||||||
$errorMessage = implode(', ', $workflowErrors);
|
$errorMessage = implode(', ', $workflowErrors);
|
||||||
|
|
||||||
return $errorMessage;
|
return $errorMessage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1253,6 +1253,7 @@ class TestSecurity(unittest.TestCase):
|
||||||
|
|
||||||
# Publish
|
# Publish
|
||||||
self.assertSuccessfulResponse(self.admin_misp_connector.publish(created_event))
|
self.assertSuccessfulResponse(self.admin_misp_connector.publish(created_event))
|
||||||
|
sleep(6);
|
||||||
|
|
||||||
# Event is published, so normal user should see that event
|
# Event is published, so normal user should see that event
|
||||||
self.assertTrue(logged_in.event_exists(created_event.uuid))
|
self.assertTrue(logged_in.event_exists(created_event.uuid))
|
||||||
|
|
Loading…
Reference in New Issue