示例#1
0
 function getAuth()
 {
     parent::getAuth();
     $au = $this->getAuthUser();
     if (!$au || $au->company()->comptype != 'OWNER') {
         $this->jerrAuth();
     }
     return true;
 }
示例#2
0
 function getAuth()
 {
     parent::getAuth();
     $au = $this->getAuthUser();
     if (!$au) {
         $this->jerr("Not authenticated", array('authFailure' => true));
     }
     $this->authUser = $au;
     return true;
 }
示例#3
0
 function getAuth()
 {
     parent::getAuth();
     // load company!
     $au = $this->getAuthUser();
     if (!$au || !$au->pid()) {
         die("authenticated Users only");
     }
     $this->authUser = $au;
     return true;
 }
示例#4
0
 function getAuth()
 {
     parent::getAuth();
     // load company!
     //return true;
     $au = $this->getAuthUser();
     if (!$au) {
         die("Access denied");
     }
     $this->authUser = $au;
     return true;
 }
示例#5
0
 function getAuth()
 {
     parent::getAuth();
     // load company!
     $au = $this->getAuthUser();
     if (!$au) {
         $this->jerr("Not authenticated", array('authFailure' => true));
     }
     if ($au->company()->comptype != 'OWNER') {
         $this->jerr("Permission Denied");
     }
     $this->authUser = $au;
     return true;
 }
示例#6
0
文件: I18n.php 项目: roojs/Pman.Core
 function getAuth()
 {
     parent::getAuth();
     // load company!
     //return true;
     $au = $this->getAuthUser();
     //if (!$au) {
     //    $this->jerr("Not authenticated", array('authFailure' => true));
     //}
     $this->authUser = $au;
     $ff = HTML_FlexyFramework::get();
     $opts = empty($ff->Pman_Core_I18N) ? empty($ff->Pman_I18N) ? array() : $ff->Pman_I18N : $ff->Pman_Core_I18N;
     return true;
 }
示例#7
0
 function getAuth()
 {
     parent::getAuth();
     // load company!
     $au = $this->getAuthUser();
     if (!$au) {
         $this->jerr("Not authenticated", array('authFailure' => true));
     }
     if ($au->company()->comptype != 'OWNER') {
         $this->jerr("Error", "only company owners can manage groups");
     }
     $this->authUser = $au;
     return true;
 }
示例#8
0
 function getAuth()
 {
     parent::getAuth();
     // load company!
     $au = $this->getAuthUser();
     if (!$au) {
         $this->jerr("Not authenticated", array('authFailure' => true));
     }
     if (!$au->pid()) {
         // not set up yet..
         $this->jerr("Not authenticated", array('authFailure' => true));
     }
     $this->authUser = $au;
     return true;
 }
示例#9
0
 function getAuth()
 {
     $ff = HTML_FlexyFramework::get();
     if (!empty($ff->cli)) {
         $this->cli = true;
         return true;
     }
     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;
 }
示例#10
0
 function getAuth()
 {
     $o = PEAR::getStaticProperty('HTML_FlexyFramework', 'options');
     if (!empty($o['cli'])) {
         $this->cli = true;
         return true;
     }
     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;
 }
示例#11
0
 function get($app)
 {
     if (empty($app)) {
         die("Invalid Application");
     }
     $mod = DB_DataObject::factory('builder_modules');
     if (!$mod->get('app', $app)) {
         die("invalid module");
     }
     if (!empty($_REQUEST['no_parts'])) {
         // used to do the previewer
         $this->builderJs = array();
         //should it try and load the core???
         $o = HTML_FlexyFramework::get();
         $o->enable = '';
         $o->enableArray = array('');
         $o->disable = 'Core';
         $this->disable_jstemplate = true;
         return;
     }
     $p = DB_DataObject::factory('builder_part');
     $p->module_id = $mod->id;
     $p->selectAdd();
     $p->selectAdd('module');
     if (!$p->find()) {
         die("Invalid Application (2)");
     }
     $this->builderJs = array();
     $ff = HTML_FlexyFramework::get();
     while ($p->fetch()) {
         // file exists in file system - dont add it twice!
         // this is a bit questionable..  - we may need to check if the
         // db version is more recent.
         $fl = $ff->rootDir . '/Pman/' . $app . '/' . $p->module . '.js';
         //if (file_exists($fl) && filesize($fl)) {
         //    continue;
         //}
         $this->builderJs[] = $p->module;
     }
     $o = HTML_FlexyFramework::get();
     //echo '<PRE>';print_r($o);exit;
     $o->enable = 'Core';
     $o->enableArray = array('Core');
     //$o->options = 'Core,'.$o->options;
     return parent::get('');
 }
示例#12
0
 function getAuth()
 {
     parent::getAuth();
     return true;
 }
示例#13
0
文件: Login.php 项目: roojs/Pman.Base
 function getAuth()
 {
     parent::getAuth();
     // load company..
     return true;
 }
示例#14
0
 function jdata($ar)
 {
     if (isset($_REQUEST['dataonly'])) {
         $this->jok($ar);
     }
     parent::jdata($ar);
 }
示例#15
0
文件: Roo.php 项目: roojs/Pman.Base
 function jerr($str, $errors = array(), $content_type = false)
 {
     // standard error reporting..
     if ($this->transObj) {
         $this->transObj->query('ROLLBACK');
     }
     return parent::jerr($str, $errors, $content_type);
 }
示例#16
0
文件: Pman.php 项目: roojs/Pman.Base
 function staticGetAuthUser()
 {
     $x = new Pman();
     return $x->getAuthUser();
 }