开发者

symfony: credentials for an action in the backend

开发者 https://www.devze.com 2023-01-24 04:38 出处:网络
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

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

精彩评论

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

关注公众号