]> wagnertech.de Git - timetracker.git/blobdiff - time_edit.php
Better protection against editing and deleting approved records.
[timetracker.git] / time_edit.php
index 23cc63d5abbf21d025499aa648eb1d6534198955..ef45226b883c0c59235c92c5f34f04b58c2e4a83 100644 (file)
@@ -41,8 +41,8 @@ if (!(ttAccessAllowed('track_own_time') || ttAccessAllowed('track_time'))) {
 }
 $cl_id = (int)$request->getParameter('id');
 $time_rec = ttTimeHelper::getRecord($cl_id);
-if (!$time_rec || $time_rec['timesheet_id'] || $time_rec['invoice_id']) {
-  // Prohibit editing not ours, or assigned to timesheet, or invoiced records.
+if (!$time_rec || $time_rec['approved'] || $time_rec['timesheet_id'] || $time_rec['invoice_id']) {
+  // Prohibit editing not ours, approved, assigned to timesheet, or invoiced records.
   header('Location: access_denied.php');
   exit();
 }