mirror of https://github.com/MISP/MISP
fix: removed malware-sample and attachment from the attribute type options
- should not be possible to select these via the add/edit attribute functionspull/1881/head
parent
77810838f7
commit
8205bc9294
|
@ -255,6 +255,11 @@ class AttributesController extends AppController {
|
|||
|
||||
// combobox for types
|
||||
$types = array_keys($this->Attribute->typeDefinitions);
|
||||
foreach ($types as $key => $value) {
|
||||
if (in_array($value, array('malware-sample', 'attachment'))) {
|
||||
unset($types[$key]);
|
||||
}
|
||||
}
|
||||
$types = $this->_arrayToValuesIndexArray($types);
|
||||
$this->set('types', $types);
|
||||
// combobox for categories
|
||||
|
@ -747,6 +752,11 @@ class AttributesController extends AppController {
|
|||
// needed for RBAC
|
||||
// combobox for types
|
||||
$types = array_keys($this->Attribute->typeDefinitions);
|
||||
foreach ($types as $key => $value) {
|
||||
if (in_array($value, array('malware-sample', 'attachment'))) {
|
||||
unset($types[$key]);
|
||||
}
|
||||
}
|
||||
$types = $this->_arrayToValuesIndexArray($types);
|
||||
$this->set('types', $types);
|
||||
// combobox for categories
|
||||
|
|
|
@ -437,6 +437,11 @@ class ShadowAttributesController extends AppController {
|
|||
$this->set('event_id', $eventId);
|
||||
// combobox for types
|
||||
$types = array_keys($this->ShadowAttribute->typeDefinitions);
|
||||
foreach ($types as $key => $value) {
|
||||
if (in_array($value, array('malware-sample', 'attachment'))) {
|
||||
unset($types[$key]);
|
||||
}
|
||||
}
|
||||
$types = $this->_arrayToValuesIndexArray($types);
|
||||
$this->set('types', $types);
|
||||
// combobox for categories
|
||||
|
@ -706,6 +711,11 @@ class ShadowAttributesController extends AppController {
|
|||
|
||||
// combobox for types
|
||||
$types = array_keys($this->ShadowAttribute->typeDefinitions);
|
||||
foreach ($types as $key => $value) {
|
||||
if (in_array($value, array('malware-sample', 'attachment'))) {
|
||||
unset($types[$key]);
|
||||
}
|
||||
}
|
||||
$types = $this->_arrayToValuesIndexArray($types);
|
||||
$this->set('types', $types);
|
||||
// combobox for categories
|
||||
|
|
Loading…
Reference in New Issue