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
Post a Comment