Added more access control checks.
authoranuko <support@anuko.com>
Sun, 25 Sep 2016 20:35:09 +0000 (20:35 +0000)
committeranuko <support@anuko.com>
Sun, 25 Sep 2016 20:35:09 +0000 (20:35 +0000)
21 files changed:
expense_delete.php
expense_edit.php
invoice_add.php
invoice_delete.php
invoice_send.php
invoice_view.php
invoices.php
locking.php
notification_add.php
notification_delete.php
notification_edit.php
notifications.php
project_add.php
project_delete.php
project_edit.php
projects.php
quotas.php
task_add.php
task_delete.php
task_edit.php
tasks.php

index 38800b6..c5f53aa 100644 (file)
@@ -32,7 +32,7 @@ import('DateAndTime');
 import('ttExpenseHelper');
 
 // Access check.
-if (!ttAccessCheck(right_data_entry)) {
+if (!ttAccessCheck(right_data_entry) || !$user->isPluginEnabled('ex')) {
   header('Location: access_denied.php');
   exit();
 }
index 213cfcb..2f02691 100644 (file)
@@ -33,7 +33,7 @@ import('DateAndTime');
 import('ttExpenseHelper');
 
 // Access check.
-if (!ttAccessCheck(right_data_entry)) {
+if (!ttAccessCheck(right_data_entry) || !$user->isPluginEnabled('ex')) {
   header('Location: access_denied.php');
   exit();
 }
index f68753f..0e752dc 100644 (file)
@@ -32,7 +32,7 @@ import('ttTeamHelper');
 import('ttInvoiceHelper');
 
 // Access check.
-if (!ttAccessCheck(right_manage_team)) {
+if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('iv')) {
   header('Location: access_denied.php');
   exit();
 }
index 7db539a..41f7c19 100644 (file)
@@ -31,7 +31,7 @@ import('form.Form');
 import('ttInvoiceHelper');
 
 // Access check.
-if (!ttAccessCheck(right_manage_team)) {
+if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('iv')) {
   header('Location: access_denied.php');
   exit();
 }
index e519132..b9e2a29 100644 (file)
@@ -32,7 +32,7 @@ import('ttInvoiceHelper');
 import('ttSysConfig');
 
 // Access check.
-if (!ttAccessCheck(right_view_invoices)) {
+if (!ttAccessCheck(right_view_invoices) || !$user->isPluginEnabled('iv')) {
   header('Location: access_denied.php');
   exit();
 }
index 2bb9876..e94c04b 100644 (file)
@@ -32,7 +32,7 @@ import('ttInvoiceHelper');
 import('ttClientHelper');
 
 // Access check.
-if (!ttAccessCheck(right_view_invoices)) {
+if (!ttAccessCheck(right_view_invoices) || !$user->isPluginEnabled('iv')) {
   header('Location: access_denied.php');
   exit();
 }
index ad0b285..a014472 100644 (file)
@@ -31,7 +31,7 @@ import('form.Form');
 import('ttTeamHelper');
 
 // Access check.
-if (!ttAccessCheck(right_view_invoices)) {
+if (!ttAccessCheck(right_view_invoices) || !$user->isPluginEnabled('iv')) {
   header('Location: access_denied.php');
   exit();
 }
index dfdc2f2..8acdcd7 100644 (file)
@@ -31,7 +31,7 @@ import('form.Form');
 import('ttTeamHelper');
 
 // Access check.
-if (!ttAccessCheck(right_manage_team)) {
+if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('lk')) {
   header('Location: access_denied.php');
   exit();
 }
index 80f46bb..05b6ce0 100644 (file)
@@ -34,7 +34,7 @@ import('ttFavReportHelper');
 import('ttNotificationHelper');
 
 // Access check.
-if (!ttAccessCheck(right_manage_team)) {
+if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('no')) {
   header('Location: access_denied.php');
   exit();
 }
index 50c3395..834befb 100644 (file)
@@ -31,7 +31,7 @@ import('form.Form');
 import('ttNotificationHelper');
 
 // Access check.
-if (!ttAccessCheck(right_manage_team)) {
+if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('no')) {
   header('Location: access_denied.php');
   exit();
 }
index 30a9d8f..cd3f41b 100644 (file)
@@ -34,7 +34,7 @@ import('ttFavReportHelper');
 import('ttNotificationHelper');
 
 // Access check.
-if (!ttAccessCheck(right_manage_team)) {
+if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('no')) {
   header('Location: access_denied.php');
   exit();
 }
index 6a66b2f..68cdfff 100644 (file)
@@ -31,7 +31,7 @@ import('form.Form');
 import('ttTeamHelper');
 
 // Access check.
-if (!ttAccessCheck(right_manage_team)) {
+if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('no')) {
   header('Location: access_denied.php');
   exit();
 }
index 1c825d9..fe46a6b 100644 (file)
@@ -32,7 +32,7 @@ import('ttProjectHelper');
 import('ttTeamHelper');
 
 // Access check.
-if (!ttAccessCheck(right_manage_team)) {
+if (!ttAccessCheck(right_manage_team) || (MODE_PROJECTS != $user->tracking_mode && MODE_PROJECTS_AND_TASKS != $user->tracking_mode)) {
   header('Location: access_denied.php');
   exit();
 }
index b6f4655..832bf4f 100644 (file)
@@ -31,7 +31,7 @@ import('form.Form');
 import('ttProjectHelper');
 
 // Access check.
-if (!ttAccessCheck(right_manage_team)) {
+if (!ttAccessCheck(right_manage_team) || (MODE_PROJECTS != $user->tracking_mode && MODE_PROJECTS_AND_TASKS != $user->tracking_mode)) {
   header('Location: access_denied.php');
   exit();
 }
index 9cca73e..11abccc 100644 (file)
@@ -32,7 +32,7 @@ import('ttProjectHelper');
 import('ttTeamHelper');
 
 // Access check.
-if (!ttAccessCheck(right_manage_team)) {
+if (!ttAccessCheck(right_manage_team) || (MODE_PROJECTS != $user->tracking_mode && MODE_PROJECTS_AND_TASKS != $user->tracking_mode)) {
   header('Location: access_denied.php');
   exit();
 }
index cc79e4a..d9f3685 100644 (file)
@@ -31,7 +31,7 @@ import('form.Form');
 import('ttTeamHelper');
 
 // Access check.
-if (!ttAccessCheck(right_data_entry)) {
+if (!ttAccessCheck(right_data_entry) || (MODE_PROJECTS != $user->tracking_mode && MODE_PROJECTS_AND_TASKS != $user->tracking_mode)) {
   header('Location: access_denied.php');
   exit();
 }
index 68b8a61..d846ae2 100644 (file)
@@ -32,7 +32,7 @@ import('form.Form');
 import('ttTeamHelper');
 
 // Access check.
-if (!ttAccessCheck(right_manage_team)) {
+if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('mq')) {
   header('Location: access_denied.php');
   exit();
 }
index ff98c97..5ef549b 100644 (file)
@@ -33,7 +33,7 @@ import('ttTeamHelper');
 import('ttTaskHelper');
 
 // Access check.
-if (!ttAccessCheck(right_manage_team)) {
+if (!ttAccessCheck(right_manage_team) || MODE_PROJECTS_AND_TASKS != $user->tracking_mode) {
   header('Location: access_denied.php');
   exit();
 }
index 3fd8350..ebc96e2 100644 (file)
@@ -31,7 +31,7 @@ import('ttTaskHelper');
 import('form.Form');
 
 // Access check.
-if (!ttAccessCheck(right_manage_team)) {
+if (!ttAccessCheck(right_manage_team) || MODE_PROJECTS_AND_TASKS != $user->tracking_mode) {
   header('Location: access_denied.php');
   exit();
 }
index 943e9a9..077c7c6 100644 (file)
@@ -32,7 +32,7 @@ import('ttTeamHelper');
 import('ttTaskHelper');
 
 // Access check.
-if (!ttAccessCheck(right_manage_team)) {
+if (!ttAccessCheck(right_manage_team) || MODE_PROJECTS_AND_TASKS != $user->tracking_mode) {
   header('Location: access_denied.php');
   exit();
 }
index cf7f607..3ea2faa 100644 (file)
--- a/tasks.php
+++ b/tasks.php
@@ -31,7 +31,7 @@ import('form.Form');
 import('ttTeamHelper');
 
 // Access check.
-if (!ttAccessCheck(right_manage_team)) {
+if (!ttAccessCheck(right_manage_team) || MODE_PROJECTS_AND_TASKS != $user->tracking_mode) {
   header('Location: access_denied.php');
   exit();
 }