]> wagnertech.de Git - timetracker.git/blobdiff - file_download.php
posaune
[timetracker.git] / file_download.php
index 8a17b4d7b033e8052b4f86f894a9764405e42253..e4d35c705035a7632bc0be38e4fdedebc97a2aad 100644 (file)
@@ -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();
   }