diff --git a/modules/notifications/lib/Module/Notifications/NotificationsContainerRegistrar.php b/modules/notifications/lib/Module/Notifications/NotificationsContainerRegistrar.php index dde3fa4..c642263 100644 --- a/modules/notifications/lib/Module/Notifications/NotificationsContainerRegistrar.php +++ b/modules/notifications/lib/Module/Notifications/NotificationsContainerRegistrar.php @@ -15,11 +15,15 @@ use MintyPHP\Module\Notifications\Service\NotificationService; use MintyPHP\Module\Notifications\Service\NotificationServicesFactory; use MintyPHP\Repository\Tenant\UserTenantRepository; use MintyPHP\Repository\User\UserReadRepository; +use MintyPHP\Service\Access\PermissionService; final class NotificationsContainerRegistrar implements ContainerRegistrar { public function register(AppContainer $container): void { + $container->set(NotificationsAuthorizationPolicy::class, static fn (AppContainer $c): NotificationsAuthorizationPolicy => new NotificationsAuthorizationPolicy( + $c->get(PermissionService::class) + )); $container->set(NotificationRepositoryFactory::class, static fn (): NotificationRepositoryFactory => new NotificationRepositoryFactory()); $container->set(NotificationServicesFactory::class, static fn (AppContainer $c): NotificationServicesFactory => new NotificationServicesFactory(