|
@@ -24,7 +24,25 @@ use Doctrine\Common\Collections\Collection;
|
|
|
*
|
|
*
|
|
|
* @see \App\Doctrine\Billing\CurrentResidenceAreaExtension
|
|
* @see \App\Doctrine\Billing\CurrentResidenceAreaExtension
|
|
|
*/
|
|
*/
|
|
|
-#[ApiResource(operations: [])] // @see App\Doctrine\Billing\CurrentResidenceAreaExtension
|
|
|
|
|
|
|
+#[ApiResource(
|
|
|
|
|
+ operations: [
|
|
|
|
|
+ new Get(
|
|
|
|
|
+ security: 'is_granted(\'ROLE_ORGANIZATION_VIEW\') and object.getBillingSetting().getOrganization().getId() == user.getOrganization().getId()'
|
|
|
|
|
+
|
|
|
|
|
+ ),
|
|
|
|
|
+ new Put(
|
|
|
|
|
+ security: 'object.getBillingSetting().getOrganization().getId() == user.getOrganization().getId()'
|
|
|
|
|
+ ),
|
|
|
|
|
+ new Delete(
|
|
|
|
|
+ security: 'object.getBillingSetting().getOrganization().getId() == user.getOrganization().getId()'
|
|
|
|
|
+ ),
|
|
|
|
|
+ new GetCollection(
|
|
|
|
|
+ security: 'is_granted(\'ROLE_ORGANIZATION_VIEW\')'
|
|
|
|
|
+ ),
|
|
|
|
|
+ new Post()
|
|
|
|
|
+ ],
|
|
|
|
|
+ security: 'is_granted(\'ROLE_ORGANIZATION\')'
|
|
|
|
|
+)]
|
|
|
//#[Auditable]
|
|
//#[Auditable]
|
|
|
#[BillingSettingDefaultValue(fieldName: "billingSetting")]
|
|
#[BillingSettingDefaultValue(fieldName: "billingSetting")]
|
|
|
#[ORM\Entity(repositoryClass: ResidenceAreaRepository::class)]
|
|
#[ORM\Entity(repositoryClass: ResidenceAreaRepository::class)]
|