Skip to content

method_access_control not doing anything #212

@bvisonl

Description

@bvisonl

I am cleaning up several peaces of my application and I am trying to move from having the @ PreAuthorize annotation to use the YML method..

I have the following configuration:

jms_security_extra:
    # Enables expression language
    expressions: true

    # Actions Security
    method_access_control:
        # Dashboard
        'AppBundle:Dashboard/Dashboard:indexAction': 'hasRole("ROLE_TEST")'

but it's not doing anything.. I have tried to replace the Dashboard/Dashboard with Dashboard\Dashboard but still nothing.. lastly I tried to do ':indexAction$' instead of the FQCN but still nothing it let's me in right away..

Is there something that I am missing to configure this? It was working fine with the annotations.

"symfony/symfony": "2.8.9"
"jms/security-extra-bundle": "^1.5",

PHP Version is 5.6.24

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions