use user hasRight

This commit is contained in:
Frédéric France
2023-06-20 18:16:19 +02:00
parent 6458075a3d
commit 52eff0b56c
11 changed files with 20 additions and 20 deletions

View File

@@ -402,7 +402,7 @@ class modEventOrganization extends DolibarrModules
if (empty($user->rights->societe->client->voir)) {
$this->export_sql_end[$r] .= ' AND (sc.fk_user = '.(empty($user) ? 0 : $user->id).' OR ac.fk_soc IS NULL)';
}
if (empty($user->rights->agenda->allactions->read)) {
if (!$user->hasRight('agenda', 'allactions', 'read')) {
$this->export_sql_end[$r] .= ' AND acr.fk_element = '.(empty($user) ? 0 : $user->id);
}
$this->export_sql_order[$r] = ' ORDER BY ac.datep';