Merge pull request #21604 from bb2a/FIX---php-V8-user-right-actioncomm-class

FIX - php V8 user right actioncomm class
This commit is contained in:
Laurent Destailleur 2022-07-28 19:01:56 +02:00 committed by GitHub
commit 2cbb71f523
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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) {