Fix user dashboard homescreen permissions
This commit is contained in:
parent
2fc1abc893
commit
63806556de
|
@ -699,7 +699,7 @@ class Manager implements PublicLogin
|
|||
}
|
||||
|
||||
// Check ACl.
|
||||
if (\is_user_admin($config['id_user']) !== true) {
|
||||
if (\is_user_admin($id_user) !== true) {
|
||||
// Non-admin user can see dashboards of his groups and 'AR' profile.
|
||||
$group_list = \users_get_groups(
|
||||
$id_user,
|
||||
|
|
|
@ -31,6 +31,7 @@ global $config;
|
|||
$headerTitle = __('User detail editor');
|
||||
// Load the header.
|
||||
require $config['homedir'].'/operation/users/user_edit_header.php';
|
||||
use PandoraFMS\Dashboard\Manager;
|
||||
|
||||
if (is_metaconsole() === false) {
|
||||
include 'include/javascript/timezonepicker/includes/parser.inc';
|
||||
|
@ -442,7 +443,13 @@ if (!$meta) {
|
|||
|
||||
$home_screen .= html_print_select($values, 'section', io_safe_output($user_info['section']), 'show_data_section();', '', -1, true, false, false).'</div>';
|
||||
|
||||
$dashboards = get_user_dashboards($config['id_user']);
|
||||
$dashboards = Manager::getDashboards(
|
||||
-1,
|
||||
-1,
|
||||
false,
|
||||
false,
|
||||
$config['id_user']
|
||||
);
|
||||
|
||||
$dashboards_aux = [];
|
||||
if ($dashboards === false) {
|
||||
|
|
Loading…
Reference in New Issue