Fix : permission error on category view
This commit is contained in:
parent
f56abb1e5f
commit
5f32d17158
@ -952,7 +952,7 @@ if ($type == Categorie::TYPE_ACCOUNT) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List of Project
|
// List of Project
|
||||||
if ($type == Categorie::TYPE_PROJECT) {
|
if ($type == Categorie::TYPE_PROJECT ) {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||||
|
|
||||||
$permission = $user->rights->projet->creer;
|
$permission = $user->rights->projet->creer;
|
||||||
@ -1030,7 +1030,7 @@ if ($type == Categorie::TYPE_PROJECT) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List of users
|
// 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';
|
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||||
|
|
||||||
$users = $object->getObjectsInCateg($type);
|
$users = $object->getObjectsInCateg($type);
|
||||||
@ -1099,6 +1099,9 @@ if ($type == Categorie::TYPE_USER) {
|
|||||||
|
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
print_barre_liste($langs->trans("Users"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'user');
|
||||||
|
accessforbidden($langs->trans("NotEnoughPermissions"), 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user