Skip to content

Allow an object #13

@Nyholm

Description

@Nyholm

I would like to pass an object in the annotation. Like

    /**
     * @Secure(roles="ROLE_TEST")
     * @Secure(roles="EDIT", "company")
     * @Route("/company/{id}/edit", name="edit_company")
     */
    public function helloAction($company)
    {
        return array('name' => $company->getName());
    }

This will take the parameter $company and run $this->authorizationChecker->isGranted($role, $company)

Im happy to make a PR to achieve this but I would like to hear your thoughts first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions