household address: add household api entry point

This commit is contained in:
nobohan 2021-06-04 12:13:15 +02:00
parent d806a074a7
commit 7b67ef5db2

View File

@ -202,7 +202,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
'workflows' => [ 'workflows' => [
'accompanying_period_lifecycle' => [ 'accompanying_period_lifecycle' => [
'type' => 'state_machine', 'type' => 'state_machine',
'audit_trail' => [ 'audit_trail' => [
'enabled' => true 'enabled' => true
], ],
'marking_store' => [ 'marking_store' => [
@ -355,15 +355,15 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
'controller' => \Chill\PersonBundle\Controller\AccompanyingCourseApiController::class, 'controller' => \Chill\PersonBundle\Controller\AccompanyingCourseApiController::class,
'actions' => [ 'actions' => [
'_entity' => [ '_entity' => [
'roles' => [ 'roles' => [
Request::METHOD_GET => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, Request::METHOD_GET => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE,
Request::METHOD_PATCH => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, Request::METHOD_PATCH => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE,
Request::METHOD_PUT => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, Request::METHOD_PUT => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE,
], ],
'methods' => [ 'methods' => [
Request::METHOD_GET => true, Request::METHOD_GET => true,
Request::METHOD_PUT => true, Request::METHOD_PUT => true,
Request::METHOD_PATCH => true, Request::METHOD_PATCH => true,
] ]
], ],
'participation' => [ 'participation' => [
@ -380,61 +380,61 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
], ],
'resource' => [ 'resource' => [
'methods' => [ 'methods' => [
Request::METHOD_POST => true, Request::METHOD_POST => true,
Request::METHOD_DELETE => true, Request::METHOD_DELETE => true,
Request::METHOD_GET => false, Request::METHOD_GET => false,
Request::METHOD_HEAD => false, Request::METHOD_HEAD => false,
], ],
'roles' => [ 'roles' => [
Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE,
Request::METHOD_DELETE=> \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE Request::METHOD_DELETE=> \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE
] ]
], ],
'comment' => [ 'comment' => [
'methods' => [ 'methods' => [
Request::METHOD_POST => true, Request::METHOD_POST => true,
Request::METHOD_DELETE => true, Request::METHOD_DELETE => true,
Request::METHOD_GET => false, Request::METHOD_GET => false,
Request::METHOD_HEAD => false, Request::METHOD_HEAD => false,
], ],
'roles' => [ 'roles' => [
Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE,
Request::METHOD_DELETE=> \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE Request::METHOD_DELETE=> \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE
] ]
], ],
'requestor' => [ 'requestor' => [
'methods' => [ 'methods' => [
Request::METHOD_POST => true, Request::METHOD_POST => true,
Request::METHOD_DELETE => true, Request::METHOD_DELETE => true,
Request::METHOD_GET => false, Request::METHOD_GET => false,
Request::METHOD_HEAD => false, Request::METHOD_HEAD => false,
], ],
'roles' => [ 'roles' => [
Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE,
Request::METHOD_DELETE=> \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE Request::METHOD_DELETE=> \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE
] ]
], ],
'scope' => [ 'scope' => [
'methods' => [ 'methods' => [
Request::METHOD_POST => true, Request::METHOD_POST => true,
Request::METHOD_DELETE => true, Request::METHOD_DELETE => true,
Request::METHOD_GET => false, Request::METHOD_GET => false,
Request::METHOD_HEAD => false, Request::METHOD_HEAD => false,
], ],
'roles' => [ 'roles' => [
Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE,
Request::METHOD_DELETE=> \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE Request::METHOD_DELETE=> \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE
] ]
], ],
'socialissue' => [ 'socialissue' => [
'methods' => [ 'methods' => [
Request::METHOD_POST => true, Request::METHOD_POST => true,
Request::METHOD_DELETE => true, Request::METHOD_DELETE => true,
Request::METHOD_GET => false, Request::METHOD_GET => false,
Request::METHOD_HEAD => false, Request::METHOD_HEAD => false,
], ],
'controller_action' => 'socialIssueApi', 'controller_action' => 'socialIssueApi',
'roles' => [ 'roles' => [
Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE,
Request::METHOD_DELETE=> \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' => [ 'confirm' => [
'methods' => [ 'methods' => [
Request::METHOD_POST => true, Request::METHOD_POST => true,
Request::METHOD_GET => false, Request::METHOD_GET => false,
Request::METHOD_HEAD => false, Request::METHOD_HEAD => false,
], ],
'roles' => [ 'roles' => [
Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, 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
]
],
]
],
] ]
]); ]);
} }