Fixed policy import with centralized management in node
Former-commit-id: f76d8a777c155aa706af34cbe2091b3c8bf09a9d
This commit is contained in:
parent
715bdbb04d
commit
fd3762cabe
|
@ -998,20 +998,25 @@ function process_upload_xml($xml)
|
|||
{
|
||||
$hook_enterprise = enterprise_include('extensions/resource_registration/functions.php');
|
||||
|
||||
// Extract component
|
||||
// Extract component.
|
||||
process_upload_xml_component($xml);
|
||||
|
||||
$group_filter = get_parameter('group');
|
||||
|
||||
// Extract visual map
|
||||
// Extract visual map.
|
||||
process_upload_xml_visualmap($xml, $group_filter);
|
||||
|
||||
// Extract policies
|
||||
// Extract policies.
|
||||
if ($hook_enterprise === true) {
|
||||
process_upload_xml_policy($xml, $group_filter);
|
||||
$centralized_management = !is_central_policies_on_node();
|
||||
if ($centralized_management) {
|
||||
process_upload_xml_policy($xml, $group_filter);
|
||||
} else {
|
||||
ui_print_error_message(__('This node is configured with centralized mode. Go to metaconsole to create a policy.'));
|
||||
}
|
||||
}
|
||||
|
||||
// Extract reports
|
||||
// Extract reports.
|
||||
process_upload_xml_report($xml, $group_filter);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue