php - Admin that create simple users using FOSUserBundle -


i'm trying learn symfony creating simple project. began creatin dashboard admin.

this administrator have right create type of users called "proprietaire", once "proprieraire" connected can create type of users "simple user".

i tried manage login admin using fosuserbundle , done.

the problem how create "proprietaire" type user using form admin page? , how same creating "simple" type user "proprietaire" page ?

i have 3 roles : role_admin, role_prop , role_simple

my security.yml file :

# app/config/security.yml 

security: encoders: fos\userbundle\model\userinterface: bcrypt

role_hierarchy:     role_prop:       role_user     role_admin: role_prop  providers:     fos_userbundle:         id: fos_user.user_provider.username  firewalls:     main:         pattern: ^/         form_login:             provider: fos_userbundle             csrf_token_generator: security.csrf.token_manager             # if using symfony < 2.8, use following config instead:             # csrf_provider: form.csrf_provider          logout:       true         anonymous:    true  access_control:     - { path: ^/login$, role: is_authenticated_anonymously }     - { path: ^/register, role: is_authenticated_anonymously }     - { path: ^/resetting, role: is_authenticated_anonymously }     - { path: ^/safeparking/admin, role: role_admin }     - { path: ^/safeparking, role: is_authenticated_anonymously } 

i'm using symfon 2.8.5 pugxmultiuserbundle isn't solution me.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -