posaune
[timetracker.git] / index.php
index d390ebf..cabc706 100644 (file)
--- a/index.php
+++ b/index.php
@@ -30,13 +30,12 @@ require_once('initialize.php');
 
 // Redirects for admin and client roles.
 if ($auth->isAuthenticated()) {
-  if ($user->isAdmin()) {
-    header('Location: admin_teams.php');
+  if ($user->can('administer_site')) {
+    header('Location: admin_groups.php');
     exit();
-  }
-  else if ($user->isClient()) {
+  } elseif ($user->isClient()) {
     header('Location: reports.php');
-    exit();    
+    exit();
   }
 }
 
@@ -78,4 +77,3 @@ if ($mobileBrowser) {
 <?php 
 }
 ?>
-