Hi georg,

Could you let me see the code, because I implemented the User and the
Role class but this does not work fine. I think that the problem is
caused by roles because I put the role IS_AUTHENTICATED_ANONYMOUSLY,
this one works fine. My application does not return any exception but
this one redirect to form login again.

I am reading the following tutorial :
http://www.dobervich.com/2011/03/21/symfony2-blog-application-tutorial-part-v-intro-to-security/

security.yml:

security:

    encoders:
        Openxesta\UserBundle\Entity\Usuario:
            algorithm:  md5
            iterations: 10
            encode_as_base64: true

    role_hierarchy:
        ROLE_ADMIN:       ROLE_USER
        ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN,
ROLE_ALLOWED_TO_SWITCH]

    providers:
        main:
            entity: { class : Openxesta\UserBundle\Entity\Usuario,
property: firstname }


    firewalls:
       main:
            pattern: /.*
            form_login:
                check_path: /login_check
                login_path: /login
                always_use_default_target_path: true
                default_target_path: /
            logout: true
            security: true
            anonymous: true


    access_control:

        - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/$, role: ROLE_ADMIN }
        - { path: ^/.*/+$, role: ROLE_ADMIN }

-- 
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 users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to