mirror of https://github.com/MISP/MISP
fix: Managing Delegation Request - wrong organisation in popup fixed, fixes #2079
parent
1237fff0ac
commit
50c94e338b
|
@ -84,7 +84,7 @@ class EventDelegationsController extends AppController {
|
|||
$delegation = $this->EventDelegation->find('first', array(
|
||||
'conditions' => array('EventDelegation.id' => $id),
|
||||
'recursive' => -1,
|
||||
'contain' => array('Org', 'Event'),
|
||||
'contain' => array('Org', 'Event', 'RequesterOrg'),
|
||||
));
|
||||
if (empty($delegation) || (!$this->_isSiteAdmin() && $this->Auth->user('org_id') != $delegation['EventDelegation']['org_id'])) throw new MethodNotAllowedException('You are not authorised to do that.');
|
||||
if ($this->request->is('post')) {
|
||||
|
@ -129,7 +129,7 @@ class EventDelegationsController extends AppController {
|
|||
$delegation = $this->EventDelegation->find('first', array(
|
||||
'conditions' => array('EventDelegation.id' => $id),
|
||||
'recursive' => -1,
|
||||
'contain' => array('Org', 'Event'),
|
||||
'contain' => array('Org', 'Event', 'RequesterOrg'),
|
||||
));
|
||||
if (empty($delegation) || (!$this->_isSiteAdmin() && !in_array($this->Auth->user('org_id'), array($delegation['EventDelegation']['requester_org_id'], $delegation['EventDelegation']['org_id'])))) throw new MethodNotAllowedException('You are not authorised to do that.');
|
||||
if ($this->request->is('post')) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="confirmation">
|
||||
<div class="legend">Accept Delegation Request</div>
|
||||
<div style="padding-left:5px;padding-right:5px;padding-bottom:5px;">
|
||||
<p>Are you sure you would like to accept the request by <?php echo h($delegationRequest['Org']['name']); ?> to take ownership of Event #<?php echo h($delegationRequest['Event']['id']);?>?</p>
|
||||
<p>Are you sure you would like to accept the request by <?php echo h($delegationRequest['RequesterOrg']['name']); ?> to take ownership of Event #<?php echo h($delegationRequest['Event']['id']);?>?</p>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="confirmation">
|
||||
<div class="legend">Delete Delegation Request</div>
|
||||
<div style="padding-left:5px;padding-right:5px;padding-bottom:5px;">
|
||||
<p>Are you sure you would like to discard the request by <?php echo h($delegationRequest['Org']['name']); ?> to take owenership of Event #<?php echo h($delegationRequest['Event']['id']);?>?</p>
|
||||
<p>Are you sure you would like to discard the request by <?php echo h($delegationRequest['RequesterOrg']['name']); ?> to take owenership of Event #<?php echo h($delegationRequest['Event']['id']);?>?</p>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
|
|
Loading…
Reference in New Issue