I've a Problem with my Security...
I am making an application with two diff different Roles but only one login ...
The Problem is, i want that
If a [Role_Jury] logs in, that he gets send to /jury and If a [Role_Admin] logs in, that he gets send to /admin
#app/config/security.yml
security: firewalls: secured_area: pattern: ^/ anonymous: ~ form_login: provider: chain_provider login_path: login check_path: login_check logout: path: /logout target: /login
role_hierarchy:
ROLE_JURY: ROLE_JURY
ROLE_ADMIN: ROLE_ADMIN
access_control:
- { path: ^/admin/, roles: ROLE_ADMIN }
- { path: ^/jury/, roles: ROLE_JURY }
# Include the following line to also secure the /admin path itself
# - { path: ^/admin$, roles: ROLE_ADMIN }
providers:
in_memory:
memory:
users:
admin: { password: asdf1234, roles: 'ROLE_ADMIN' }
jurymitglieder:
entity: { class: EbcAppBundle:Jurymitglied, property: username }
chain_provider:
chain:
providers: [ in_memory, jurymitglieder ]
encoders:
Symfony\Component\Security\Core\User\User: plaintext
Ebc\AppBundle\Entity\Jurymitglied: plaintext
Aucun commentaire:
Enregistrer un commentaire