feat: modification de la gestion des rôles + ajout rôle d'un bureau (!52)
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
| Numéro du ticket | Titre du ticket | |------------------|-----------------| | | | ## Description de la PR ## Modification du .env ## Check list - [ ] Pas de régression - [ ] TU/TI/TF rédigée - [ ] TU/TI/TF OK - [ ] CHANGELOG modifié Reviewed-on: #52 Co-authored-by: tristan <tristan@yuno.malio.fr> Co-committed-by: tristan <tristan@yuno.malio.fr>
This commit was merged in pull request #52.
This commit is contained in:
@@ -19,7 +19,7 @@ use App\State\Bovin\BovineInventoryExportProvider;
|
||||
description: "Retourne un fichier XLSX listant tous les bovins actifs (exitedAt IS NULL) triés par date de naissance croissante, avec colorisation des lignes selon l'âge.",
|
||||
tags: ['Bovines'],
|
||||
),
|
||||
security: "is_granted('ROLE_ADMIN')",
|
||||
security: "is_granted('ROLE_BUREAU')",
|
||||
output: false,
|
||||
provider: BovineInventoryExportProvider::class,
|
||||
),
|
||||
|
||||
@@ -19,7 +19,7 @@ use App\State\Bovin\BovineSyncInventoryProcessor;
|
||||
description: 'Upsert des bovins par numéro national ; marque comme sortis ceux absents de la réponse EDNOTIF.',
|
||||
tags: ['Bovines'],
|
||||
),
|
||||
security: "is_granted('ROLE_ADMIN')",
|
||||
security: "is_granted('ROLE_BUREAU')",
|
||||
input: false,
|
||||
output: self::class,
|
||||
processor: BovineSyncInventoryProcessor::class,
|
||||
|
||||
@@ -81,7 +81,7 @@ class Bovine
|
||||
|
||||
#[ORM\Column(type: 'float', nullable: true)]
|
||||
#[Groups(['bovine:read', 'bovine:write', 'building_case:read'])]
|
||||
#[ApiProperty(security: "is_granted('ROLE_ADMIN')")]
|
||||
#[ApiProperty(security: "is_granted('ROLE_BUREAU')")]
|
||||
private ?float $pricePerKg = null;
|
||||
|
||||
#[ORM\Column(type: 'date_immutable', nullable: true)]
|
||||
@@ -177,7 +177,7 @@ class Bovine
|
||||
}
|
||||
|
||||
#[Groups(['bovine:read', 'building_case:read'])]
|
||||
#[ApiProperty(security: "is_granted('ROLE_ADMIN')")]
|
||||
#[ApiProperty(security: "is_granted('ROLE_BUREAU')")]
|
||||
public function getFinalPrice(): ?float
|
||||
{
|
||||
if (null === $this->receivedWeight || null === $this->pricePerKg) {
|
||||
|
||||
@@ -61,6 +61,7 @@ use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
|
||||
),
|
||||
new Delete(
|
||||
requirements: ['id' => '\d+'],
|
||||
security: "is_granted('ROLE_ADMIN')",
|
||||
),
|
||||
new Get(
|
||||
uriTemplate: '/receptions/weigh',
|
||||
|
||||
@@ -61,6 +61,7 @@ use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
|
||||
),
|
||||
new Delete(
|
||||
requirements: ['id' => '\d+'],
|
||||
security: "is_granted('ROLE_ADMIN')",
|
||||
),
|
||||
new Get(
|
||||
uriTemplate: '/shipments/weigh',
|
||||
|
||||
Reference in New Issue
Block a user