diff --git a/app/Model/Event.php b/app/Model/Event.php index 2c105d9c0..f2c5f7eda 100755 --- a/app/Model/Event.php +++ b/app/Model/Event.php @@ -4320,7 +4320,6 @@ class Event extends AppModel $jobId ); } - return $this->publish($id, $passAlong); } @@ -4365,6 +4364,7 @@ class Event extends AppModel 'recursive' => -1, 'conditions' => array('Event.id' => $id) )); + if (empty($event)) { return false; } @@ -4413,6 +4413,7 @@ class Event extends AppModel $success = $this->executeTrigger('event-publish', $fullEvent[0], $workflowErrors, $logging); if (empty($success)) { $errorMessage = implode(', ', $workflowErrors); + return $errorMessage; } } diff --git a/tests/testlive_security.py b/tests/testlive_security.py index d51b2828e..638c636b3 100644 --- a/tests/testlive_security.py +++ b/tests/testlive_security.py @@ -1253,6 +1253,7 @@ class TestSecurity(unittest.TestCase): # Publish self.assertSuccessfulResponse(self.admin_misp_connector.publish(created_event)) + sleep(6); # Event is published, so normal user should see that event self.assertTrue(logged_in.event_exists(created_event.uuid))