Michal, based on the advice given by others in this thread I have been able 
to achieve a single firewall, access control, and testing of roles in 
templates.

This is my security.config:

security.config:
    encoders:
        Symfony\Component\Security\User\AccountInterface: plaintext
    providers:
        main:
            users:
                admin: { password: demo, roles: ROLE_ADMIN }
    # Require a proper login for /admin actions, only an anonymous user to 
browse
    access_control:
        - { path: /admin/.*, role: ROLE_ADMIN }
        - { path: /.*, role: IS_AUTHENTICATED_ANONYMOUSLY }
    firewalls:
        main:
            pattern:    /.*
            form-login: true
            anonymous: true
            logout: true

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to