symfony: credentials for an action in the backend
I have this in the generator.yml of a module:
config:
actions:
_new: { credentials: [user] }
and I've overwriten the action "new" i mention in the generator.yml this way:
public function executeNew(sfWebRequest $request)
{
var_dump($this->开发者_如何学C;getCredential());
$this->form = $this->configuration->getForm();
$this->Sedi = $this->form->getObject();
}
When i execute the new action i get "null". I expected to get "user".
I did "cc".
Any idea?
Javier
You can use security.yml
to restrict actions.
精彩评论