Fix can read category if can run takepos.

This commit is contained in:
Laurent Destailleur 2021-12-05 13:01:05 +01:00
parent 7e835ec915
commit 2b505ec9b8

View File

@ -2483,7 +2483,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
if (empty($entity) || empty($conf->categorie->multidir_output[$entity])) {
return array('accessallowed'=>0, 'error'=>'Value entity must be provided');
}
if ($fuser->rights->categorie->{$lire}) {
if ($fuser->rights->categorie->{$lire} || $fuser->rights->takepos->run) {
$accessallowed = 1;
}
$original_file = $conf->categorie->multidir_output[$entity].'/'.$original_file;