Closed
Description
Description
When a user logs in with a ldap dn, we need the ability to add roles by groups the user is a member of.
Example
security:
providers:
some_ldap:
ldap:
service: Symfony\Component\Ldap\Ldap
base_dn: cn=Users,dc=example,dc=com
search_dn: "cn=MyService,ou=Services,dc=example,dc=com"
search_password: '%env(resolve:LDAP_PW)%'
default_roles: ROLE_USER
roles:
'CN=Administrators,CN=Builtin,DC=example,DC=com': ROLE_ADMIN
extra_fields: ['mail']
Which would result in a user with the a CN=Administrators,CN=Builtin,DC=example,DC=com
membership to be assigned the ROLE_ADMIN
role.