示例#1
0
 /**
  * Initialization hook method.
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->_Roles = TableRegistry::get($this->plugin . '.Roles');
     $this->_Permissions = TableRegistry::get($this->plugin . '.Permissions');
     $this->loadModel($this->plugin . '.PermissionsTable');
 }
示例#2
0
 /**
  * Initialization hook method.
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadComponent('Search.Prg', ['actions' => ['index']]);
     if ($this->request->param('action') == 'add') {
         $this->Security->config('unlockedFields', ['password', 'password_confirm']);
     }
 }