From 12a837bda9be6aeec00bb1932dc264ba1072d132 Mon Sep 17 00:00:00 2001 From: fs Date: Wed, 25 Mar 2026 19:39:02 +0100 Subject: [PATCH] fix(notifications): register authorization policy in DI container NotificationsAuthorizationPolicy was never registered in the container, so ModuleClassResolver could not instantiate it (requires PermissionService). This silently prevented the notifications.view permission from being granted, hiding the bell icon in the topbar. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../Module/Notifications/NotificationsContainerRegistrar.php | 4 ++++ 1 file changed, 4 insertions(+) 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(