G
G
Gleb Nikolaev2018-08-10 16:55:53
symfony
Gleb Nikolaev, 2018-08-10 16:55:53

How to get a list of all base Roles and their children in Symfony 4?

Actually a subject. You need to get the List of roles to use when creating/editing a user.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis, 2018-08-11
@prototype_denis

The security component's role hierarchy is stored in the security.role_hierarchy.roles parameter
$container->getParameter('security.role_hierarchy.roles');
But it is better to use not roles, but role groups.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question