Skip to content

Commit

Permalink
FIX only a superadmin can manage users in transverse mode
Browse files Browse the repository at this point in the history
  • Loading branch information
hregis committed Apr 8, 2024
1 parent 77863c8 commit 7db1f33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/core/menus/standard/eldy.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ function get_left_menu_home($mainmenu, &$newmenu, $usemenuhider = 1, $leftmenu =
if ($user->hasRight('user', 'user', 'read')) {
if ($usemenuhider || empty($leftmenu) || $leftmenu == "users") {
$newmenu->add("", $langs->trans("Users"), 1, $user->hasRight('user', 'user', 'lire') || $user->admin);
$newmenu->add("/user/card.php?leftmenu=users&action=create", $langs->trans("NewUser"), 2, ($user->hasRight("user", "user", "write") || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE')), '', 'home');
$newmenu->add("/user/card.php?leftmenu=users&action=create", $langs->trans("NewUser"), 2, ($user->hasRight("user", "user", "write") || $user->admin) && !(isModEnabled('multicompany') && !empty($conf->entity) && getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE')), '', 'home');
$newmenu->add("/user/list.php?leftmenu=users", $langs->trans("ListOfUsers"), 2, $user->hasRight('user', 'user', 'lire') || $user->admin);
$newmenu->add("/user/hierarchy.php?leftmenu=users", $langs->trans("HierarchicView"), 2, $user->hasRight('user', 'user', 'lire') || $user->admin);
if (isModEnabled('category')) {
Expand Down

0 comments on commit 7db1f33

Please sign in to comment.