mirror of https://github.com/MISP/MISP
* chg: creator e-mail in the event details, fixes #1252pull/1503/head
parent
e4f0de7805
commit
90c28602c3
|
@ -857,6 +857,10 @@ class EventsController extends AppController {
|
|||
}
|
||||
$results = $this->Event->fetchEvent($this->Auth->user(), $conditions);
|
||||
if (empty($results)) throw new NotFoundException('Invalid event');
|
||||
//if the current user is an org admin AND event belongs to his/her org, fetch also the event creator info
|
||||
if ($this->userRole['perm_admin'] && !$this->_isSiteAdmin() && ($results[0]['Org']['id'] == $this->Auth->user('org_id'))) {
|
||||
$results[0]['User']['email'] = $this->User->field('email', array('id' , $results[0]['Event']['user_id']));
|
||||
}
|
||||
$event = &$results[0];
|
||||
if ($this->_isRest()) {
|
||||
$this->set('event', $event);
|
||||
|
|
Loading…
Reference in New Issue