2
0
forked from Wavyzz/dolibarr

use user hasRight

This commit is contained in:
Frédéric France
2023-06-12 20:10:42 +02:00
parent 22d15b42fc
commit 0cb70110eb
46 changed files with 68 additions and 68 deletions

View File

@@ -122,7 +122,7 @@ function fichinter_prepare_head($object)
$head[$h][0] = DOL_URL_ROOT.'/fichinter/agenda.php?id='.$object->id;
$head[$h][1] = $langs->trans('Events');
if (isModEnabled('agenda')&& (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) {
if (isModEnabled('agenda')&& ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) {
$nbEvent = 0;
// Enable caching of thirdparty count actioncomm
require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php';