Merge pull request #21671 from Hystepik/develop#4

Fix : Permission error on category view Yogosha report 11811
This commit is contained in:
Laurent Destailleur 2022-08-10 04:35:36 +02:00 committed by GitHub
commit a61183661a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1030,7 +1030,7 @@ if ($type == Categorie::TYPE_PROJECT) {
}
// List of users
if ($type == Categorie::TYPE_USER) {
if ($type == Categorie::TYPE_USER && $user->hasRight("user", "user", "read")) {
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
$users = $object->getObjectsInCateg($type);
@ -1099,6 +1099,9 @@ if ($type == Categorie::TYPE_USER) {
print '</form>'."\n";
}
} else {
print_barre_liste($langs->trans("Users"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'user');
accessforbidden($langs->trans("NotEnoughPermissions"), 0, 0);
}