2be9cd05d4
Socle RBAC du module Transport (M4 § 5) :
- TransportModule::permissions() declare transport.carriers.{view,manage,archive}
- RbacSeeder::MATRIX (§ 5.2) : Bureau (view+manage), Commerciale (view) ;
Compta/Usine aucun acces ; archive admin seul
- config/sidebar.php : section Transport + item /carriers (gate transport.carriers.view)
- i18n sidebar.transport.{section,carriers}
- 3 miroirs RBAC alignes : sidebar.php, personas.ts (user-full), SeedE2ECommand.php
- TransportModuleTest : garde-fou sur le jeu de permissions
35 lines
1.2 KiB
PHP
35 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Module\Transport;
|
|
|
|
final class TransportModule
|
|
{
|
|
public const string ID = 'transport';
|
|
public const string LABEL = 'Transport';
|
|
public const bool REQUIRED = false;
|
|
|
|
/**
|
|
* Liste declarative des permissions RBAC exposees par le module Transport.
|
|
*
|
|
* Socle du repertoire transporteurs (M4 § 5.1, ERP-153) :
|
|
* - `view` : consultation de la liste / fiche transporteur ;
|
|
* - `manage` : creation / modification (hors archivage) ;
|
|
* - `archive` : archivage / restauration (admin seul, cf. matrice § 5.2).
|
|
*
|
|
* Consommee par `app:sync-permissions`. Matrice role -> permissions dans
|
|
* `RbacSeeder::MATRIX` (§ 5.2).
|
|
*
|
|
* @return array<int, array{code: string, label: string}>
|
|
*/
|
|
public static function permissions(): array
|
|
{
|
|
return [
|
|
['code' => 'transport.carriers.view', 'label' => 'Voir les transporteurs'],
|
|
['code' => 'transport.carriers.manage', 'label' => 'Créer / modifier les transporteurs'],
|
|
['code' => 'transport.carriers.archive', 'label' => 'Archiver / restaurer un transporteur'],
|
|
];
|
|
}
|
|
}
|