/** * 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']); } }
/** * Before filter callback. * * @param Event $event * @return void */ public function beforeFilter(Event $event) { parent::beforeFilter($event); $this->Security->config('unlockedActions', ['permissions']); }