开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜