Some refactoring of access checks - in progress.
[timetracker.git] / invoice_add.php
index ed0a8c5..5267056 100644 (file)
@@ -31,11 +31,15 @@ import('form.Form');
 import('ttTeamHelper');
 import('ttInvoiceHelper');
 
-// Access check.
-if (!ttAccessAllowed('manage_invoices') || !$user->isPluginEnabled('iv')) {
+// Access checks.
+if (!ttAccessAllowed('manage_invoices')) {
   header('Location: access_denied.php');
   exit();
 }
+if (!$user->isPluginEnabled('iv')) {
+  header('Location: feature_disabled.php');
+  exit();
+}
 
 if ($request->isPost()) {
   $cl_date = $request->getParameter('date');