Some refactoring of access checks - in progress.
[timetracker.git] / index.php
index 51e1e01..fd4dde8 100644 (file)
--- a/index.php
+++ b/index.php
@@ -30,7 +30,7 @@ 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();
   } elseif ($user->isClient()) {