]> wagnertech.de Git - timetracker.git/blobdiff - expense_delete.php
Fixed the charts tab to work better for lower roles only.
[timetracker.git] / expense_delete.php
index 06c9690b0fca79cfd673e56f13268dd584935183..1f7fbb34bc0268b9811f934a078401a0f71faf11 100644 (file)
@@ -31,11 +31,15 @@ import('form.Form');
 import('DateAndTime');
 import('ttExpenseHelper');
 
-// Access check.
-if (!ttAccessAllowed('track_own_expenses') || !$user->isPluginEnabled('ex')) {
+// Access checks.
+if (!(ttAccessAllowed('track_own_expenses') || ttAccessAllowed('track_expenses'))) {
   header('Location: access_denied.php');
   exit();
 }
+if (!$user->isPluginEnabled('ex')) {
+  header('Location: feature_disabled.php');
+  exit();
+}
 
 $cl_id = $request->getParameter('id');
 $expense_item = ttExpenseHelper::getItem($cl_id, $user->getActiveUser());