chg: [internal] JSONConverterTool's support for the deprecated showorg flag removed

pull/3626/head
iglocska 2018-09-03 17:53:51 +02:00
parent 924dfcbec9
commit 57a6460d81
1 changed files with 0 additions and 11 deletions

View File

@ -44,13 +44,6 @@ class JSONConverterTool
// cleanup the array from things we do not want to expose
//
unset($event['Event']['user_id']);
// hide the org field is we are not in showorg mode
if (!Configure::read('MISP.showorg') && !$isSiteAdmin) {
unset($event['Event']['org']);
unset($event['Event']['orgc']);
unset($event['Event']['from']);
}
if (isset($event['Event']['Attribute'])) {
$event['Event']['Attribute'] = $this->__cleanAttributes($event['Event']['Attribute']);
if (!empty($event['Sighting'])) {
@ -87,10 +80,6 @@ class JSONConverterTool
if (isset($event['Event']['RelatedEvent'])) {
foreach ($event['Event']['RelatedEvent'] as $key => $value) {
unset($event['Event']['RelatedEvent'][$key]['Event']['user_id']);
if (!Configure::read('MISP.showorg') && !$isSiteAdmin) {
unset($event['Event']['RelatedEvent'][$key]['Event']['org']);
unset($event['Event']['RelatedEvent'][$key]['Event']['orgc']);
}
}
}
$result = array('Event' => $event['Event']);