Fix: User can see events that are not assigned to it
This commit is contained in:
parent
1a62a36b86
commit
7a077a2d99
@ -576,6 +576,18 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand
|
||||
$sql.= " WHERE dbt.".$dbt_select." IN (".$objectid.")";
|
||||
$sql.= " AND dbt.entity IN (".getEntity($sharedelement, 1).")";
|
||||
}
|
||||
|
||||
if ($feature == 'agenda')// Also check myactions rights
|
||||
{
|
||||
if ($objectid > 0 && empty($user->rights->agenda->allactions->read)) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php';
|
||||
$action = new ActionComm($db);
|
||||
$action->fetch($objectid);
|
||||
if ($action->authorid != $user->id && $action->userownerid != $user->id && !(array_key_exists($user->id,$action->userassigned))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif (in_array($feature, $checkproject))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user