to implement credentials do I need to implement a preExecute function like this:
public function preExecute() {
$this->configuration = new jobGeneratorConfiguration();
if (!$this->getUser()->hasCredential(
$this->configuration->getCredentials($this->getActionName())
));
}
Or is it suffice to have it defined in the module/config/security.yml like this:
all:
is_secure: true
credentials: [ admin ]
However I am not able to work it out using security.yml only! I thought preExecute is not necessary and symfony automatically handles it by loading the security.yml definition! Please help!
I am using sfDoctrineGuardPlugin and sfForkedDoctrineApply plugin..