feat(core) : add CoreModule, user repository contract, notifier contract and enriched user contract
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Module\Core;
|
||||
|
||||
use App\Shared\Domain\Module\ModuleInterface;
|
||||
|
||||
final class CoreModule implements ModuleInterface
|
||||
{
|
||||
public static function id(): string
|
||||
{
|
||||
return 'core';
|
||||
}
|
||||
|
||||
public static function label(): string
|
||||
{
|
||||
return 'Core';
|
||||
}
|
||||
|
||||
public static function isRequired(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Permissions posées pour le RBAC fin (1.2). Inertes tant que 1.2 n'est pas livré.
|
||||
*
|
||||
* @return list<array{code: string, label: string}>
|
||||
*/
|
||||
public static function permissions(): array
|
||||
{
|
||||
return [
|
||||
['code' => 'core.user.read', 'label' => 'Consulter les utilisateurs'],
|
||||
['code' => 'core.user.manage', 'label' => 'Gérer les utilisateurs'],
|
||||
['code' => 'core.notification.read', 'label' => 'Consulter ses notifications'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user