chg: [servers:index] Improved UI

Only show blocked attribute types/objects if setting is turned on
pull/8022/head
Sami Mokaddem 2021-12-10 10:07:37 +01:00
parent 7d87fef8ea
commit 6479f841a1
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 4 additions and 1 deletions

View File

@ -41,7 +41,10 @@ foreach ($servers as $server):
$rules['push'] = json_decode($server['Server']['push_rules'], true);
$rules['pull'] = json_decode($server['Server']['pull_rules'], true);
$syncOptions = array('pull', 'push');
$fieldOptions = array('tags', 'orgs', 'type_attributes', 'type_objects');
$fieldOptions = array('tags', 'orgs');
if (!empty(Configure::read('MISP.enable_synchronisation_filtering_on_type'))) {
$fieldOptions = array_merge($fieldOptions, ['type_attributes', 'type_objects']);
}
$typeOptions = array('OR' => array('colour' => 'green', 'text' => 'allowed'), 'NOT' => array('colour' => 'red', 'text' => 'blocked'));
$ruleDescription = array('pull' => '', 'push' => '');
foreach ($syncOptions as $syncOption) {