Exemple #1
0
 public static function install(array $options = array())
 {
     $result = parent::install($options);
     if (!Backend::getDB('default')) {
         return $result;
     }
     $result = Permission::add('anonymous', 'index', 'home') && $result;
     $result = Permission::add('anonymous', 'error', 'home') && $result;
     //TODO Keep this here until we have role hierarchies
     $result = Permission::add('authenticated', 'index', 'home') && $result;
     $result = Permission::add('authenticated', 'error', 'home') && $result;
     return $result;
 }
Exemple #2
0
 public static function install(array $options = array())
 {
     if (!Backend::getDB('default')) {
         return true;
     }
     $install_model = array_key_exists('install_model', $options) ? $options['install_model'] : true;
     $toret = parent::install($options);
     $class = get_called_class();
     if ($class && class_exists($class, true)) {
         if ($install_model) {
             $toret = call_user_func(array(get_called_class(), 'installModel'), $class . 'Obj', $options);
         }
     }
     return $toret;
 }
Exemple #3
0
 public static function install(array $options = array())
 {
     $toret = parent::install($options);
     $toret = Hook::add('display', 'post', get_called_class(), array('global' => 1)) && $toret;
     return $toret;
 }
Exemple #4
0
 public static function install(array $options = array())
 {
     $toret = parent::install($options);
     $toret = Permission::add('nobody', 'define', __CLASS__) && $toret;
     $toret = Permission::add('authenticated', 'define', __CLASS__) && $toret;
     $toret = Permission::add('bi', 'define', __CLASS__) && $toret;
     $toret = Permission::add('bisp', 'define', __CLASS__) && $toret;
     $toret = Permission::add('user', 'define', __CLASS__) && $toret;
     $toret = Permission::add('nobody', 'index', __CLASS__) && $toret;
     $toret = Permission::add('authenticated', 'index', __CLASS__) && $toret;
     $toret = Permission::add('bi', 'index', __CLASS__) && $toret;
     $toret = Permission::add('bisp', 'index', __CLASS__) && $toret;
     $toret = Permission::add('user', 'index', __CLASS__) && $toret;
     return $toret;
 }
Exemple #5
0
 public static function install(array $options = array())
 {
     $toret = parent::install($options);
     //Hook::add('init', 'pre', __CLASS__, array('global' => 1)) && $toret;
     return $toret;
 }
Exemple #6
0
 public static function install(array $options = array())
 {
     $result = parent::install($options);
     if (!Backend::getDB('default')) {
         return $result;
     }
     $result = Hook::add('display', 'post', __CLASS__, array('global' => true, 'mode' => 'html')) && $result;
     $result = Permission::add('anonymous', 'continual', 'admin') && $result;
     $result = Permission::add('anonymous', 'daily', 'admin') && $result;
     $result = Permission::add('anonymous', 'weekly', 'admin') && $result;
     $result = Permission::add('authenticated', 'continual', 'admin') && $result;
     $result = Permission::add('authenticated', 'daily', 'admin') && $result;
     $result = Permission::add('authenticated', 'weekly', 'admin') && $result;
     return $result;
 }