代码之家  ›  专栏  ›  技术社区  ›  tirenweb

symfony:后端操作的凭据

  •  0
  • tirenweb  · 技术社区  · 14 年前

    我在一个模块的generator.yml中有这个:

    config:
      actions:
        _new:  { credentials: [user] }
    

    这种方式:

    public function executeNew(sfWebRequest $request)
    {
    
    var_dump($this->getCredential());
    
    $this->form = $this->configuration->getForm();
    $this->Sedi = $this->form->getObject();
    }
    

    当我执行新操作时,我得到“null”。我希望得到“用户”。

    我做了“抄送”。

    知道吗?

    哈维尔

    1 回复  |  直到 14 年前
        1
  •  0
  •   sloth    12 年前

    你可以用 security.yml 限制行动。