Refactor header to use user rights. (#57)
[timetracker.git] / quotas.php
index 19e70e5..c921fba 100644 (file)
@@ -32,11 +32,15 @@ import('form.Form');
 import('ttTeamHelper');
 import('ttTimeHelper');
 
-// Access check.
-if (!ttAccessAllowed('manage_advanced_settings') || !$user->isPluginEnabled('mq')) {
+// Access checks.
+if (!ttAccessAllowed('manage_advanced_settings')) {
   header('Location: access_denied.php');
   exit();
 }
+if (!$user->isPluginEnabled('mq')) {
+  header('Location: feature_disabled.php');
+  exit();
+}
 
 // Start and end fallback values for the Year dropdown.
 $yearStart = 2015;