mirror of https://github.com/MISP/MISP
fix: [UI] Show edit icon for event reports just when user have permission
parent
a162f24c66
commit
ca9be6e1bc
|
@ -14,8 +14,8 @@ class EventReportsController extends AppController
|
|||
public $paginate = array(
|
||||
'limit' => 60,
|
||||
'order' => array(
|
||||
'EventReport.event_id' => 'ASC',
|
||||
'EventReport.name' => 'ASC'
|
||||
'EventReport.event_id' => 'ASC',
|
||||
'EventReport.name' => 'ASC'
|
||||
),
|
||||
'recursive' => -1,
|
||||
'contain' => array(
|
||||
|
@ -202,6 +202,8 @@ class EventReportsController extends AppController
|
|||
$fetcherModule = $this->EventReport->isFetchURLModuleEnabled();
|
||||
$this->set('importModuleEnabled', is_array($fetcherModule));
|
||||
$this->render('ajax/indexForEvent');
|
||||
} else {
|
||||
$this->set('title_for_layout', __('Event Reports'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
),
|
||||
array(
|
||||
'name' => __('Event ID'),
|
||||
'sort' => 'event_id',
|
||||
'class' => 'short',
|
||||
'element' => 'links',
|
||||
'data_path' => 'EventReport.event_id',
|
||||
|
@ -91,7 +92,10 @@
|
|||
'url_params_data_paths' => array(
|
||||
'EventReport.id'
|
||||
),
|
||||
'icon' => 'edit'
|
||||
'icon' => 'edit',
|
||||
'complex_requirement' => function (array $row) use ($me) {
|
||||
return $me['Role']['perm_site_admin'] || $me['org_id'] == $row['Event']['orgc_id'];
|
||||
}
|
||||
),
|
||||
array(
|
||||
'title' => __('Delete'),
|
||||
|
|
Loading…
Reference in New Issue