show user list to anyone who can edit passwords, not the more-restricted classes

This commit is contained in:
Shish 2020-03-13 10:08:23 +00:00
parent 7fa9d11512
commit d261a7f76e

View File

@ -307,7 +307,7 @@ class UserPage extends Extension
{
global $user;
if ($event->parent==="system") {
if ($user->can(Permissions::EDIT_USER_CLASS)) {
if ($user->can(Permissions::EDIT_USER_PASSWORD)) {
$event->add_nav_link("user_admin", new Link('user_admin/list'), "User List", NavLink::is_active(["user_admin"]));
}
}
@ -317,7 +317,7 @@ class UserPage extends Extension
{
global $user;
$event->add_link("My Profile", make_link("user"));
if ($user->can(Permissions::EDIT_USER_CLASS)) {
if ($user->can(Permissions::EDIT_USER_PASSWORD)) {
$event->add_link("User List", make_link("user_admin/list"), 98);
}
$event->add_link("Log Out", make_link("user_admin/logout"), 99);