mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Fix list all private dashboards on user edition
This commit is contained in:
parent
f2ad934c92
commit
cdd1569364
@ -1313,7 +1313,14 @@ $home_screen .= html_print_select(
|
||||
).'</div>';
|
||||
|
||||
|
||||
$dashboards = Manager::getDashboards(-1, -1);
|
||||
$dashboards = Manager::getDashboards(
|
||||
-1,
|
||||
-1,
|
||||
false,
|
||||
false,
|
||||
$id_usr
|
||||
);
|
||||
|
||||
$dashboards_aux = [];
|
||||
if ($dashboards === false) {
|
||||
$dashboards = ['None' => 'None'];
|
||||
|
@ -675,7 +675,8 @@ class Manager implements PublicLogin
|
||||
int $offset=-1,
|
||||
int $limit=-1,
|
||||
bool $favourite=false,
|
||||
bool $slideshow=false
|
||||
bool $slideshow=false,
|
||||
string $id_user=''
|
||||
):array {
|
||||
global $config;
|
||||
|
||||
@ -693,11 +694,15 @@ class Manager implements PublicLogin
|
||||
$sql_where .= 'AND td.cells_slideshow = 1';
|
||||
}
|
||||
|
||||
if (empty($id_user) === true) {
|
||||
$id_user = $config['id_user'];
|
||||
}
|
||||
|
||||
// Check ACl.
|
||||
if (\is_user_admin($config['id_user']) !== true) {
|
||||
if (\is_user_admin($id_user) !== true) {
|
||||
// User no admin see dashboards of him groups and profile 'AR'.
|
||||
$group_list = \users_get_groups(
|
||||
$config['id_user'],
|
||||
$id_user,
|
||||
'RR',
|
||||
true
|
||||
);
|
||||
@ -727,7 +732,7 @@ class Manager implements PublicLogin
|
||||
GROUP BY td.id
|
||||
ORDER BY name%s",
|
||||
$string_groups,
|
||||
$config['id_user'],
|
||||
$id_user,
|
||||
$sql_where,
|
||||
$sql_limit
|
||||
);
|
||||
@ -746,7 +751,7 @@ class Manager implements PublicLogin
|
||||
WHERE td.id_group = 0 AND td.id_user = '%s' %s
|
||||
GROUP BY td.id
|
||||
ORDER BY name%s",
|
||||
$config['id_user'],
|
||||
$id_user,
|
||||
$sql_where,
|
||||
$sql_limit
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user