Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0

This commit is contained in:
Laurent Destailleur 2023-04-08 14:44:01 +02:00
commit 3af71d5ded
2 changed files with 2 additions and 1 deletions

View File

@ -1590,7 +1590,7 @@ class ActionComm extends CommonObject
}
$canread = 0;
if (!empty($user->rights->agenda->myactions->read) && $this->authorid == $user->id) {
if ($user->hasRight('agenda', 'myactions', 'read') && ($this->authorid == $user->id || $this->userownerid == $user->id)) {
$canread = 1; // Can read my event
}
if (!empty($user->rights->agenda->myactions->read) && array_key_exists($user->id, $this->userassigned)) {

View File

@ -926,6 +926,7 @@ while ($i < $imaxinloop) {
$actionstatic->datep = $db->jdate($obj->dp);
$actionstatic->percentage = $obj->percent;
$actionstatic->authorid = $obj->fk_user_author;
$actionstatic->userownerid = $obj->fk_user_action;
// Initialize $this->userassigned && this->socpeopleassigned array && this->userownerid
// but only if we need it