From 5148ae57d2cd8dc370b71677aa1507c9860ac536 Mon Sep 17 00:00:00 2001 From: Mat Date: Fri, 25 May 2018 14:07:10 +0200 Subject: [PATCH] =?UTF-8?q?suis=20la=20proc=C3=A9dure=20de=20FOSUserBundle?= =?UTF-8?q?=20pour=20mettre=20en=20place=20les=20groupes=20(roles)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * voir https://symfony.com/doc/2.0.x/bundles/FOSUserBundle/groups.html * $ php bin/console doctrine:generate:entities TechnoBundle:User --no-backup * $ php bin/console doctrine:generate:entities TechnoBundle:Group --no-backup * $ php bin/console doctrine:schema:update --dump-sql --complete * $ php bin/console doctrine:schema:update --force --- app/config/config.yml | 2 ++ app/config/routing.yml | 4 +++ src/TechnoBundle/Entity/Group.php | 25 +++++++++++++++++++ src/TechnoBundle/Entity/User.php | 9 +++++++ .../Repository/GroupRepository.php | 13 ++++++++++ 5 files changed, 53 insertions(+) create mode 100644 src/TechnoBundle/Entity/Group.php mode change 100755 => 100644 src/TechnoBundle/Entity/User.php create mode 100644 src/TechnoBundle/Repository/GroupRepository.php diff --git a/app/config/config.yml b/app/config/config.yml index efc8f4f..61af82e 100755 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -83,6 +83,8 @@ fos_user: db_driver: orm firewall_name: main user_class: TechnoBundle\Entity\User + group: + group_class: TechnoBundle\Entity\Group from_email: address: mat@collectifs.net sender_name: admin diff --git a/app/config/routing.yml b/app/config/routing.yml index 34e96b2..8efb304 100755 --- a/app/config/routing.yml +++ b/app/config/routing.yml @@ -34,3 +34,7 @@ fos_user_resetting: fos_user_change_password: resource: "@FOSUserBundle/Resources/config/routing/change_password.xml" prefix: /profile + +fos_user_group: + resource: "@FOSUserBundle/Resources/config/routing/group.xml" + prefix: /group diff --git a/src/TechnoBundle/Entity/Group.php b/src/TechnoBundle/Entity/Group.php new file mode 100644 index 0000000..9ec7930 --- /dev/null +++ b/src/TechnoBundle/Entity/Group.php @@ -0,0 +1,25 @@ +