diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 8a172d1a0b0..0cd03ebb475 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -2727,7 +2727,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } elseif ($modulepart == 'export' && !empty($conf->export->dir_temp)) { // Wrapping for export module // Note that a test may not be required because we force the dir of download on the directory of the user that export - $accessallowed = $user->rights->import->run; + $accessallowed = $user->rights->export->run; $original_file = $conf->export->dir_temp.'/'.$fuser->id.'/'.$original_file; } elseif ($modulepart == 'import' && !empty($conf->import->dir_temp)) { // Wrapping for import module