mirror of https://github.com/MISP/MISP
fix: [enrichment] Set distributions & sgs for all the possible views
parent
465e69f84b
commit
c6e7e9284b
|
@ -5052,6 +5052,13 @@ class EventsController extends AppController
|
|||
break;
|
||||
}
|
||||
}
|
||||
$distributions = $this->Event->Attribute->distributionLevels;
|
||||
$sgs = $this->Event->SharingGroup->fetchAllAuthorised($this->Auth->user(), 'name', 1);
|
||||
if (empty($sgs)) {
|
||||
unset($distributions[4]);
|
||||
}
|
||||
$this->set('distributions', $distributions);
|
||||
$this->set('sgs', $sgs);
|
||||
if ($format == 'misp_standard') {
|
||||
$this->__queryEnrichment($attribute, $module, $options, $type);
|
||||
} else {
|
||||
|
@ -5166,13 +5173,6 @@ class EventsController extends AppController
|
|||
$resultArray[$key]['data'] = basename($tempFile) . '|' . filesize($tempFile);
|
||||
}
|
||||
}
|
||||
$distributions = $this->Event->Attribute->distributionLevels;
|
||||
$sgs = $this->Event->SharingGroup->fetchAllAuthorised($this->Auth->user(), 'name', 1);
|
||||
if (empty($sgs)) {
|
||||
unset($distributions[4]);
|
||||
}
|
||||
$this->set('distributions', $distributions);
|
||||
$this->set('sgs', $sgs);
|
||||
$this->set('type', $type);
|
||||
if (!$event){
|
||||
$this->set('event', array('Event' => $attribute[0]['Event']));
|
||||
|
|
Loading…
Reference in New Issue