Example #1
0
 public static function hasAccess($path)
 {
     $userModel = new self();
     $user = $userModel->getCurrentUser();
     if ($user->role == Model_User::SUPERUSER_ROLE) {
         return true;
     } else {
         $path = Digitalus_Toolbox_String::stripLeading("/", $path);
         $path = str_replace("/", "_", $path);
         if ($userModel->queryPermissions($path)) {
             return true;
         } else {
             return false;
         }
     }
 }