mirror of https://github.com/MISP/MISP
Default distribution level flags in bootstrap.php
- Each instance can now have its own default event and attribute distribution level setpull/195/head
parent
aa66d5dece
commit
0ee45af902
|
@ -142,6 +142,8 @@ Configure::write('CyDefSIG.dns', 'false'); // there is a nameserver available
|
|||
//Configure::write('MISP.welcome_text_bottom', 'instance'); // used in Events::login after the MISP logo
|
||||
//Configure::write('MISP.welcome_logo', 'organisation'); // used in Events::login to the left of the MISP logo, place a .png file in app/webroot/img with the name specified here. In this case it would be organisation.png
|
||||
Configure::write('MISP.disablerestalert', 'false');
|
||||
Configure::write('MISP.default_event_distribution', 3);
|
||||
Configure::write('MISP.default_attribute_distribution', 3);
|
||||
|
||||
/**
|
||||
* The settings below can be used to set additional paths to models, views and controllers.
|
||||
|
|
|
@ -495,6 +495,9 @@ class AttributesController extends AppController {
|
|||
$attribute['value'] = $entry['Value'];
|
||||
$attribute['to_ids'] = ($entry['Confidence'] > 51) ? 1 : 0; // To IDS if high confidence
|
||||
$attribute['distribution'] = 3; // 'All communities'
|
||||
if (Configure::read('MISP.default_attribute_distribution') != null) {
|
||||
$attribute['distribution'] = Configure::read('MISP.default_attribute_distribution');
|
||||
}
|
||||
switch($entry['Type']) {
|
||||
case 'Address':
|
||||
$attribute['category'] = 'Network activity';
|
||||
|
|
|
@ -1835,7 +1835,10 @@ class EventsController extends AppController {
|
|||
$this->Event->read(null, $id);
|
||||
$saveEvent['Event'] = $this->Event->data['Event'];
|
||||
$saveEvent['Event']['published'] = false;
|
||||
$dist = $this->Event->data['Event']['distribution'];
|
||||
$dist = 3;
|
||||
if (Configure::read('MISP.default_attribute_distribution') != null) {
|
||||
$dist = Configure::read('MISP.default_attribute_distribution');
|
||||
}
|
||||
// read XML
|
||||
$event = $this->IOCImport->readXML($fileData, $id, $dist);
|
||||
|
||||
|
|
|
@ -11,10 +11,14 @@
|
|||
'empty' => '(first choose category)'
|
||||
));
|
||||
if ('true' == Configure::read('CyDefSIG.sync')) {
|
||||
$initialDistribution = 3;
|
||||
if (Configure::read('MISP.default_attribute_distribution') != null) {
|
||||
$initialDistribution = Configure::read('MISP.default_attribute_distribution');
|
||||
}
|
||||
echo $this->Form->input('distribution', array(
|
||||
'options' => array($distributionLevels),
|
||||
'label' => 'Distribution',
|
||||
'selected' => $currentDist,
|
||||
'selected' => $initialDistribution,
|
||||
));
|
||||
}
|
||||
echo $this->Form->input('value', array(
|
||||
|
|
|
@ -8,10 +8,14 @@
|
|||
'after' => $this->Html->div('forminfo', '', array('id' => 'AttributeCategoryDiv')),
|
||||
));
|
||||
if ('true' == Configure::read('CyDefSIG.sync')) {
|
||||
$initialDistribution = 3;
|
||||
if (Configure::read('MISP.default_attribute_distribution') != null) {
|
||||
$initialDistribution = Configure::read('MISP.default_attribute_distribution');
|
||||
}
|
||||
echo $this->Form->input('distribution', array(
|
||||
'options' => $distributionLevels,
|
||||
'label' => 'Distribution',
|
||||
'selected' => $currentDist,
|
||||
'selected' => $initialDistribution,
|
||||
'after' => $this->Html->div('forminfo', '', array('id' => 'AttributeDistributionDiv')),
|
||||
));
|
||||
//'before' => $this->Html->div('forminfo', isset($attrDescriptions['distribution']['formdesc']) ? $attrDescriptions['distribution']['formdesc'] : $attrDescriptions['distribution']['desc']),));
|
||||
|
|
|
@ -7,11 +7,15 @@
|
|||
'type' => 'text',
|
||||
'class' => 'datepicker'
|
||||
));
|
||||
$initialDistribution = 3;
|
||||
if (Configure::read('MISP.default_event_distribution') != null) {
|
||||
$initialDistribution = Configure::read('MISP.default_event_distribution');
|
||||
}
|
||||
if ('true' == Configure::read('CyDefSIG.sync')) {
|
||||
echo $this->Form->input('distribution', array(
|
||||
'options' => array($distributionLevels),
|
||||
'label' => 'Distribution',
|
||||
'selected' => '3',
|
||||
'selected' => $initialDistribution,
|
||||
));
|
||||
}
|
||||
echo $this->Form->input('risk', array(
|
||||
|
|
Loading…
Reference in New Issue