コード例 #1
0
 function access_control_model()
 {
     parent::Base_model();
     // Setup allowed tables
     $this->load->config('khaos', true, true);
     $options = $this->config->item('acl', 'khaos');
     $this->_TABLES = $options['tables'];
     $this->_TABLES['groups'] = $this->config->item('backendpro_table_prefix') . "groups";
     $this->_TABLES['resources'] = $this->config->item('backendpro_table_prefix') . "resources";
     // Setup ACO Model
     $this->resource = new Nested_sets_model();
     $this->resource->setControlParams($this->_TABLES['acos']);
     $this->resource->setPrimaryKeyColumn('id');
     // Setup ARO Model
     $this->group = new Nested_sets_model();
     $this->group->setControlParams($this->_TABLES['aros']);
     $this->group->setPrimaryKeyColumn('id');
     log_message('debug', 'BackendPro : Access_control_model class loaded');
 }