]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/lib/ttUser.class.php
Wrote a function to update role_id for all active and inactive users.
[timetracker.git] / WEB-INF / lib / ttUser.class.php
index 2f7ff9584d149c257403395d530c61e20d626f96..f468f5522d3b94b26786eb284c79c37d61ec1a00 100644 (file)
@@ -154,7 +154,7 @@ class ttUser {
 
   // isAdmin - determines whether current user is admin (has right_administer_site).
   function isAdmin() {
-    return (right_administer_site & $this->role);
+    return $this->can('administer_site');
   }
 
   // isManager - determines whether current user is team manager.
@@ -206,8 +206,9 @@ class ttUser {
   function isDateLocked($date)
   {
     if ($this->isPluginEnabled('lk') && $this->lock_spec) {
-      // Override for managers.
-      if ($this->canManageTeam()) return false;
+
+      // Override.
+      if ($this->can('override_date_lock')) return false;
 
       require_once(LIBRARY_DIR.'/tdcron/class.tdcron.php');
       require_once(LIBRARY_DIR.'/tdcron/class.tdcron.entry.php');