Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

method_access_control not doing anything #212

Open
bvisonl opened this issue Aug 11, 2016 · 1 comment
Open

method_access_control not doing anything #212

bvisonl opened this issue Aug 11, 2016 · 1 comment

Comments

@bvisonl
Copy link

bvisonl commented Aug 11, 2016

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

@bvisonl
Copy link
Author

bvisonl commented Aug 11, 2016

Update on this, I upgraded to jms/security-extra-bundle 1.6.0 (dev-master) and now it is doing something.. but it's not matching the routes properly...I have a controller /src/AppBundle/Controller/Dashboard/DashboardController.php with an indexAction... since it has a subfolder I am not sure how to exactly match that action

I also have to be clearing cache everytime I make a change in order to see it.. don't know if that's normal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant