wip: [enrichment] Removed debug calls

- Before having new modules fully operational, let
  us at least not keep only 2 debugs within an
  exposed function
pull/4430/head
chrisr3d 2019-04-04 16:22:02 +02:00
parent 7b7ddaabb9
commit dabb87bf4b
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 11 additions and 2 deletions

View File

@ -5188,8 +5188,17 @@ class EventsController extends AppController
public function handleModuleResults($eventId)
{
debug($eventId);
debug($this->request->event);
if (!$this->userRole['perm_add']) {
throw new MethodNotAllowedException(__('Event not found or you don\'t have permissions to create attributes'));
}
if ($this->request->is('post')) {
if (!$this->Event->checkIfAuthorised($this->Auth->user(), $id)) {
throw new MethodNotAllowedException(__('Invalid event.'));
}
$this->redirect(array('controller' => 'events', 'action' => 'view', $id));
} else {
throw new MethodNotAllowedException('This endpoint requires a POST request.');
}
}
public function importModule($module, $eventId)