c5738d269b
LST-58 (2.4), part 1/2 — Client move. Prospect + repertoire front are pending the product spec and will be added on this branch afterward. - Client entity moved to src/Module/Directory/Domain/Entity; repository split into Domain/Repository/ClientRepositoryInterface + Doctrine impl (bound in services.yaml). 5 client MCP tools moved to Infrastructure/Mcp/Tool, now injecting the interface. - resolve_target_entities ClientInterface repointed to Directory\Client; Directory mapping added; DirectoryModule registered (id directory, 2 RBAC perms). Client.projects relation now uses ProjectInterface -> Directory no longer depends on ProjectManagement. - ProjectManagement Create/UpdateProjectTool inject Directory's ClientRepositoryInterface; Serializer and fixtures repointed. - Garde-fous: #[Auditable] + Timestampable/Blamable on Client (additive migration: created_at/updated_at + created_by/updated_by FK ON DELETE SET NULL + COMMENT). 161 tests green, mapping valid, no API route regression, cs-fixer clean.
42 lines
947 B
PHP
42 lines
947 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Module\Directory;
|
|
|
|
use App\Shared\Domain\Module\ModuleInterface;
|
|
|
|
final class DirectoryModule implements ModuleInterface
|
|
{
|
|
public static function id(): string
|
|
{
|
|
return 'directory';
|
|
}
|
|
|
|
public static function label(): string
|
|
{
|
|
return 'Répertoire';
|
|
}
|
|
|
|
public static function isRequired(): bool
|
|
{
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* Permissions RBAC fin du Module Directory.
|
|
*
|
|
* Additif : alimente le catalogue RBAC. La sécurité des opérations API
|
|
* reste en ROLE_USER/ROLE_ADMIN (non recâblée ici).
|
|
*
|
|
* @return list<array{code: string, label: string}>
|
|
*/
|
|
public static function permissions(): array
|
|
{
|
|
return [
|
|
['code' => 'directory.clients.view', 'label' => 'Voir les clients'],
|
|
['code' => 'directory.clients.manage', 'label' => 'Gérer les clients'],
|
|
];
|
|
}
|
|
}
|