Added team_id to project delete and update queries to reduce risk of misuse.
[timetracker.git] / index.php
index 610794e..fd4dde8 100644 (file)
--- a/index.php
+++ b/index.php
@@ -30,11 +30,10 @@ require_once('initialize.php');
 
 // Redirects for admin and client roles.
 if ($auth->isAuthenticated()) {
-  if ($user->isAdmin()) {
+  if ($user->can('administer_site')) {
     header('Location: admin_teams.php');
     exit();
-  }
-  else if ($user->isClient()) {
+  } elseif ($user->isClient()) {
     header('Location: reports.php');
     exit();
   }