security:
    firewalls:
        portfolio:
            pattern:    ^/
            anonymous: ~
            form_login:
                login_path: security_login
                check_path: security_login_check
            logout:
                path: security_logout
                target: /%locale%

    access_control:
        #- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }

    encoders:
        Symfony\Component\Security\Core\User\User: plaintext

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

    providers:
        in_memory:
            memory:
                users:
                    user:  { password: userpass, roles: [ 'ROLE_USER' ] }
                    admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] }

security:
    firewalls:
        portfolio:
            pattern:    ^/
            anonymous: ~
            form_login:
                login_path: security_login
                check_path: security_login_check
            logout:
                path: security_logout
                target: /%locale%

    access_control:
        - { path: ^/admin, roles: ROLE_ADMIN }

    encoders:
        Symfony\Component\Security\Core\User\User: plaintext

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

    providers:
        in_memory:
            memory:
                users:
                    user:  { password: userpass, roles: [ 'ROLE_USER' ] }
                    admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] }

Access control bloking /admin/* to all users except ROLE_ADMIN
Access control bloking /admin/* to all users except ROLE_ADMIN
