refactor(arch): enforce gateway compliance and remove service-wrapping gateways
This commit is contained in:
@@ -7,6 +7,7 @@ use MintyPHP\Repository\Org\UserDepartmentRepositoryInterface;
|
||||
use MintyPHP\Repository\Support\DatabaseSessionRepository;
|
||||
use MintyPHP\Repository\Tenant\UserTenantRepositoryInterface;
|
||||
use MintyPHP\Repository\User\UserWriteRepositoryInterface;
|
||||
use MintyPHP\Service\Access\PermissionService;
|
||||
|
||||
class UserAssignmentService
|
||||
{
|
||||
@@ -16,7 +17,7 @@ class UserAssignmentService
|
||||
private readonly UserRoleRepositoryInterface $userRoleRepository,
|
||||
private readonly UserDepartmentRepositoryInterface $userDepartmentRepository,
|
||||
private readonly UserDirectoryGateway $directoryGateway,
|
||||
private readonly UserPermissionGateway $permissionGateway,
|
||||
private readonly PermissionService $permissionService,
|
||||
private readonly DatabaseSessionRepository $databaseSessionRepository
|
||||
) {
|
||||
}
|
||||
@@ -181,7 +182,7 @@ class UserAssignmentService
|
||||
$ids = array_values(array_filter($ids, static fn ($id) => isset($validMap[$id])));
|
||||
}
|
||||
$result = $this->userRoleRepository->replaceForUser($userId, $ids);
|
||||
$this->permissionGateway->clearUserCache($userId);
|
||||
$this->permissionService->clearUserCache($userId);
|
||||
if ($result && $bumpAuthz) {
|
||||
$this->bumpAuthzVersion($userId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user