Some refactoring of access checks - in progress.
[timetracker.git] / login.php
index e246e0a..a3345d0 100644 (file)
--- a/login.php
+++ b/login.php
@@ -62,7 +62,7 @@ if ($request->isPost()) {
 
       $user = new ttUser(null, $auth->getUserId());
       // Redirect, depending on user role.
-      if ($user->isAdmin()) {
+      if ($user->can('administer_site')) {
         header('Location: admin_teams.php');
       } elseif ($user->isClient()) {
         header('Location: reports.php');