RefreshDatabaseCache.php
authorAlan Knowles <alan@roojs.com>
Wed, 26 Oct 2011 05:02:42 +0000 (13:02 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 26 Oct 2011 05:02:42 +0000 (13:02 +0800)
RefreshDatabaseCache.php

index 836c003..3f3ca91 100644 (file)
@@ -22,7 +22,15 @@ class Pman_Core_RefreshDatabaseCache extends Pman
             $this->cli = true;
             return true;
         }
-        die("cli only"); 
+        parent::getAuth(); // load company!
+        $au = $this->getAuthUser();
+        if (!$au || $au->company()->comptype != 'OWNER') {
+            $this->jerr("Not authenticated", array('authFailure' => true));
+        }
+        $this->authUser = $au;
+        return true;
+    
+    
     }
      
     function get($args, $opts)