ad coments and delete is_metaconsole() condition

This commit is contained in:
marcos.alconada 2019-06-12 10:13:37 +02:00
parent 23469796f8
commit 4b224d1314
3 changed files with 5 additions and 2 deletions

View File

@ -69,7 +69,7 @@ $table->data[0][10] = html_print_image('images/reporting.png', true, ['title' =>
$table->data[0][11] = "<a href='index.php?search_category=reports&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalReports).'</a>';
$table->data[0][12] = html_print_image('images/visual_console_green.png', true, ['title' => __('Maps found')]);
$table->data[0][13] = "<a href='index.php?search_category=maps&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalMaps).'</a>';
if (enterprise_installed() || is_metaconsole()) {
if (enterprise_installed()) {
$table->data[0][14] = html_print_image('images/policies.png', true, ['title' => __('Policies')]);
$table->data[0][15] = "<a href='index.php?search_category=policies&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalPolicies).'</a>';
}

View File

@ -170,6 +170,10 @@ switch ($sortField) {
}
if ($searchpolicies == 0) {
/*
We take the user groups to get policies that meet the requirements of the search
and which the user have permission on this groups
*/
$user_groups = users_get_groups($config['id_user'], 'AR', false);
$id_user_groups = array_keys($user_groups);
$id_user_groups_str = implode(',', $id_user_groups);

View File

@ -13,7 +13,6 @@
// GNU General Public License for more details.
global $config;
// require_once $config['homedir'].'/include/functions_status.php';
enterprise_include_once('include/functions_policies.php');
require_once $config['homedir'].'/enterprise/include/functions_groups.php';