Merge branch 'ent-3264-importa-politicas-desde-resource-registration-en-modo-centralizado' into 'develop'
Fixed policy import with centralized management in node See merge request artica/pandorafms!2217 Former-commit-id: abe02564ab3d19101e37f02bd9cc9f37739e1992
This commit is contained in:
commit
f807c23df7
|
@ -998,20 +998,23 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
// Extract reports
|
||||
// Extract reports.
|
||||
process_upload_xml_report($xml, $group_filter);
|
||||
}
|
||||
|
||||
|
@ -1038,6 +1041,11 @@ function resource_registration_extension_main()
|
|||
return;
|
||||
}
|
||||
|
||||
$centralized_management = !is_central_policies_on_node();
|
||||
if (!$centralized_management) {
|
||||
ui_print_warning_message(__('This node is configured with centralized mode. Go to metaconsole to create a policy.'));
|
||||
}
|
||||
|
||||
echo '<div class=notify>';
|
||||
echo __('This extension makes registering resource templates easier.').' '.__('Here you can upload a resource template in .ptr format.').' '.__('Please refer to our documentation for more information on how to obtain and use %s resources.', get_product_name()).' '.'<br> <br>'.__("You can get more resurces in our <a href='http://pandorafms.com/Library/Library/'>Public Resource Library</a>");
|
||||
echo '</div>';
|
||||
|
|
Loading…
Reference in New Issue