assign role roles
This commit is contained in:
@@ -10,6 +10,7 @@ use MintyPHP\Repository\User\UserListQueryRepositoryInterface;
|
||||
use MintyPHP\Repository\User\UserReadRepositoryInterface;
|
||||
use MintyPHP\Repository\User\UserSavedFilterRepositoryInterface;
|
||||
use MintyPHP\Repository\User\UserWriteRepositoryInterface;
|
||||
use MintyPHP\Service\Access\AssignableRoleService;
|
||||
use MintyPHP\Service\Audit\AuditServicesFactory;
|
||||
use MintyPHP\Service\Audit\UserLifecycleAuditService;
|
||||
|
||||
@@ -26,11 +27,15 @@ class UserServicesFactory
|
||||
private ?UserLifecycleRestoreService $userLifecycleRestoreService = null;
|
||||
private ?UserLifecycleAuditService $userLifecycleAuditService = null;
|
||||
|
||||
/**
|
||||
* @param \Closure(): AssignableRoleService $assignableRoleServiceFactory Lazy resolver to break circular dependency
|
||||
*/
|
||||
public function __construct(
|
||||
private readonly AuditServicesFactory $auditServicesFactory,
|
||||
private readonly UserRepositoryFactory $userRepositoryFactory,
|
||||
private readonly UserGatewayFactory $userGatewayFactory,
|
||||
private readonly DatabaseSessionRepository $databaseSessionRepository
|
||||
private readonly DatabaseSessionRepository $databaseSessionRepository,
|
||||
private readonly \Closure $assignableRoleServiceFactory
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -59,7 +64,8 @@ class UserServicesFactory
|
||||
$this->createUserDepartmentRepository(),
|
||||
$this->createUserDirectoryGateway(),
|
||||
$this->userGatewayFactory->createPermissionService(),
|
||||
$this->databaseSessionRepository
|
||||
$this->databaseSessionRepository,
|
||||
($this->assignableRoleServiceFactory)()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user