From 6479f841a18c73526d6ea919426cef6e66e7bcf8 Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Fri, 10 Dec 2021 10:07:37 +0100 Subject: [PATCH] chg: [servers:index] Improved UI Only show blocked attribute types/objects if setting is turned on --- app/View/Servers/index.ctp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/View/Servers/index.ctp b/app/View/Servers/index.ctp index 4d35a7d22..2f3b00640 100644 --- a/app/View/Servers/index.ctp +++ b/app/View/Servers/index.ctp @@ -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) {