|
|
@@ -14,6 +14,11 @@ use Symfony\Component\Serializer\Annotation\Groups;
|
|
|
#[ApiResource(
|
|
|
itemOperations: [
|
|
|
'get' => [
|
|
|
+ 'security' => '(is_granted("ROLE_ADMIN_CORE") or
|
|
|
+ is_granted("ROLE_ADMINISTRATIF_MANAGER_CORE") or
|
|
|
+ is_granted("ROLE_PEDAGOGICS_MANAGER_CORE") or
|
|
|
+ is_granted("ROLE_FINANCIAL_MANAGER_CORE")
|
|
|
+ ) and object.getOrganizationId() == user.getOrganization().getId()',
|
|
|
'method' => 'GET',
|
|
|
'path' => '/dolibarr/account/{organizationId}',
|
|
|
'requirements' => ['organizationId' => '\d+'],
|
|
|
@@ -54,12 +59,6 @@ class DolibarrAccount
|
|
|
#[Groups('dolibarr_get')]
|
|
|
private ?object $contract = null;
|
|
|
|
|
|
- /**
|
|
|
- * Sms credit remaining
|
|
|
- */
|
|
|
- #[Groups('dolibarr_get')]
|
|
|
- private string $smsCredit = "";
|
|
|
-
|
|
|
/**
|
|
|
* Last bills
|
|
|
*/
|
|
|
@@ -116,16 +115,6 @@ class DolibarrAccount
|
|
|
$this->contract = $contract;
|
|
|
}
|
|
|
|
|
|
- public function getSmsCredit(): string
|
|
|
- {
|
|
|
- return $this->smsCredit;
|
|
|
- }
|
|
|
-
|
|
|
- public function setSmsCredit(string $smsCredit): void
|
|
|
- {
|
|
|
- $this->smsCredit = $smsCredit;
|
|
|
- }
|
|
|
-
|
|
|
public function getBills(): array
|
|
|
{
|
|
|
return $this->bills;
|