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

security.yml configuration #252

Closed
evgeny-s opened this issue Aug 10, 2015 · 4 comments
Closed

security.yml configuration #252

evgeny-s opened this issue Aug 10, 2015 · 4 comments

Comments

@evgeny-s
Copy link

Sorry if I maybe understood something wrong, but I have issue after configuration like in documentation described. Problem is in the security.yml:

access_control:
        - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/admin/, role: ROLE_ADMIN }
        - { path: ^/cabinet/, role: ROLE_USER }

We have to edit regular expression like this:

access_control:
        - { path: ^/(en|ru)login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/(en|ru)register, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/(en|ru)resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/(en|ru)admin/, role: ROLE_ADMIN }
        - { path: ^/(en|ru)cabinet/, role: ROLE_USER }

This is not so pretty I think. Any workaround?

Thank you!

@marcel-burkhard
Copy link

There is a bundle for that:
http://jmsyst.com/bundles/JMSI18nRoutingBundle

@evgeny-s
Copy link
Author

evgeny-s commented Sep 4, 2015

Thank you!

@cordoval
Copy link
Contributor

cordoval commented Nov 2, 2015

you want to close this @evgeny-s ?

@evgeny-s
Copy link
Author

evgeny-s commented Nov 2, 2015

yeap, thank you.

@evgeny-s evgeny-s closed this as completed Nov 2, 2015
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

3 participants