mirror of https://github.com/MISP/MISP
Added the option to override attribute creation in the freetext import tool for site admins
- site admins can now choose to create proposals instead of attributes via the freetext import tool via a checkboxpull/897/head
parent
dedc739da5
commit
3280338205
|
@ -2711,6 +2711,7 @@ class EventsController extends AppController {
|
|||
'fields' => array('orgc_id', 'id', 'distribution', 'published', 'uuid'),
|
||||
));
|
||||
if (!$this->_isSiteAdmin() && !empty($event) && $event['Event']['orgc_id'] != $this->Auth->user('org_id')) $objectType = 'ShadowAttribute';
|
||||
else if ($this->_isSiteAdmin() && isset($this->request->data['Attribute']['force']) && $this->request->data['Attribute']['force']) $objectType = 'ShadowAttribute';
|
||||
else $objectType = 'Attribute';
|
||||
$saved = 0;
|
||||
$failed = 0;
|
||||
|
|
|
@ -3,6 +3,12 @@
|
|||
<p>Below you can see the attributes that are to be created based on the results of the free-text import. Make sure that the categories and the types are correct, often several options will be offered based on an inconclusive automatic resolution. </p>
|
||||
<?php
|
||||
echo $this->Form->create('Attribute', array('url' => '/events/saveFreeText/' . $event_id));
|
||||
if ($isSiteAdmin) {
|
||||
echo $this->Form->input('force', array(
|
||||
'checked' => false,
|
||||
'label' => 'Proposals instead of attributes',
|
||||
));
|
||||
}
|
||||
echo $this->Form->input('JsonObject', array(
|
||||
'label' => false,
|
||||
'type' => 'text',
|
||||
|
|
Loading…
Reference in New Issue