I have annotation (working)
@IsGranted("editBlog", subject="company")
but I want something like this (not working):
@IsGranted("edit", subject="company.blog")
"Company" and "Blog" are Doctrine Entities with OneToOne relation. But my action have only "company" parameter.
/**
* @IsGranted("editBlog", subject="company")
* @param CompanyEntity $company
...
* @return Response
*/
final public function defaultAction(
CompanyEntity $company,
...
)
{
...
}
How to access a variable in a subject?
Thanks!