diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 68e358f18eb..9a7114a6113 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -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) {