FIX - php V8 user right actioncomm class

This commit is contained in:
Anthony Berton 2022-07-28 11:56:07 +02:00
parent 4cd85f3029
commit 9c0cf32ef7

View File

@ -1558,13 +1558,13 @@ class ActionComm extends CommonObject
}
$canread = 0;
if ($user->rights->agenda->myactions->read && $this->authorid == $user->id) {
if (!empty($user->rights->agenda->myactions->read) && $this->authorid == $user->id) {
$canread = 1; // Can read my event
}
if ($user->rights->agenda->myactions->read && array_key_exists($user->id, $this->userassigned)) {
if (!empty($user->rights->agenda->myactions->read) && array_key_exists($user->id, $this->userassigned)) {
$canread = 1; // Can read my event i am assigned
}
if ($user->rights->agenda->allactions->read) {
if (!empty($user->rights->agenda->allactions->read)) {
$canread = 1; // Can read all event of other
}
if (!$canread) {