X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=file_download.php;h=e4d35c705035a7632bc0be38e4fdedebc97a2aad;hb=9b5a1834db24f25803fc0d461394e4a2bfcc44b7;hp=8a17b4d7b033e8052b4f86f894a9764405e42253;hpb=0cb4a15ec1079fc325845640357dfc75aba0ae23;p=timetracker.git diff --git a/file_download.php b/file_download.php index 8a17b4d7..e4d35c70 100644 --- a/file_download.php +++ b/file_download.php @@ -29,6 +29,7 @@ require_once('initialize.php'); import('form.Form'); import('ttFileHelper'); +import('ttTimeHelper'); import('ttProjectHelper'); // Access checks. @@ -41,7 +42,7 @@ if (!$file) { // Entity-specific checks. $entity_type = $file['entity_type']; if ($entity_type == 'time') { - if (!(ttAccessAllowed('track_own_time') || ttAccessAllowed('track_time')) || !ttTimeHelper::getRecord($file['entity_id'])) { + if (!(ttAccessAllowed('track_own_time') || ttAccessAllowed('track_time')) || !ttTimeHelper::getRecordForFileView($file['entity_id'])) { header('Location: access_denied.php'); exit(); }