diff --git a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php index a28887c68..776d53780 100644 --- a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php +++ b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php @@ -202,7 +202,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac 'workflows' => [ 'accompanying_period_lifecycle' => [ 'type' => 'state_machine', - 'audit_trail' => [ + 'audit_trail' => [ 'enabled' => true ], 'marking_store' => [ @@ -355,15 +355,15 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac 'controller' => \Chill\PersonBundle\Controller\AccompanyingCourseApiController::class, 'actions' => [ '_entity' => [ - 'roles' => [ + 'roles' => [ Request::METHOD_GET => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, Request::METHOD_PATCH => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, Request::METHOD_PUT => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, ], 'methods' => [ - Request::METHOD_GET => true, - Request::METHOD_PUT => true, - Request::METHOD_PATCH => true, + Request::METHOD_GET => true, + Request::METHOD_PUT => true, + Request::METHOD_PATCH => true, ] ], 'participation' => [ @@ -380,61 +380,61 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac ], 'resource' => [ 'methods' => [ - Request::METHOD_POST => true, + Request::METHOD_POST => true, Request::METHOD_DELETE => true, Request::METHOD_GET => false, Request::METHOD_HEAD => false, ], - 'roles' => [ + 'roles' => [ Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, Request::METHOD_DELETE=> \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE ] ], 'comment' => [ 'methods' => [ - Request::METHOD_POST => true, + Request::METHOD_POST => true, Request::METHOD_DELETE => true, Request::METHOD_GET => false, Request::METHOD_HEAD => false, ], - 'roles' => [ + 'roles' => [ Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, Request::METHOD_DELETE=> \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE ] ], 'requestor' => [ 'methods' => [ - Request::METHOD_POST => true, + Request::METHOD_POST => true, Request::METHOD_DELETE => true, Request::METHOD_GET => false, Request::METHOD_HEAD => false, ], - 'roles' => [ + 'roles' => [ Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, Request::METHOD_DELETE=> \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE ] ], 'scope' => [ 'methods' => [ - Request::METHOD_POST => true, + Request::METHOD_POST => true, Request::METHOD_DELETE => true, Request::METHOD_GET => false, Request::METHOD_HEAD => false, ], - 'roles' => [ + 'roles' => [ Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, Request::METHOD_DELETE=> \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE ] ], 'socialissue' => [ 'methods' => [ - Request::METHOD_POST => true, + Request::METHOD_POST => true, Request::METHOD_DELETE => true, Request::METHOD_GET => false, Request::METHOD_HEAD => false, ], 'controller_action' => 'socialIssueApi', - 'roles' => [ + 'roles' => [ Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, Request::METHOD_DELETE=> \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE ] @@ -442,11 +442,11 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac 'confirm' => [ 'methods' => [ - Request::METHOD_POST => true, + Request::METHOD_POST => true, Request::METHOD_GET => false, Request::METHOD_HEAD => false, ], - 'roles' => [ + 'roles' => [ Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, ] ], @@ -515,6 +515,27 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac ], ] ], + [ + 'class' => \Chill\PersonBundle\Entity\Household::class, + 'name' => 'household', + 'base_path' => '/api/1.0/person/household', + 'base_role' => 'ROLE_USER', + 'actions' => [ + '_index' => [ + 'methods' => [ + Request::METHOD_GET => true, + Request::METHOD_HEAD => true, + Request::METHOD_POST=> true, + ], + ], + '_entity' => [ + 'methods' => [ + Request::METHOD_GET => true, + Request::METHOD_HEAD => true + ] + ], + ] + ], ] ]); }