refactor(arch): enforce gateway compliance and remove service-wrapping gateways
This commit is contained in:
@@ -10,6 +10,7 @@ use MintyPHP\I18n;
|
||||
use MintyPHP\Repository\Auth\RememberTokenRepositoryInterface;
|
||||
use MintyPHP\Repository\User\UserReadRepositoryInterface;
|
||||
use MintyPHP\Repository\User\UserWriteRepositoryInterface;
|
||||
use MintyPHP\Service\Access\PermissionService;
|
||||
use MintyPHP\Session;
|
||||
|
||||
class RememberMeService
|
||||
@@ -21,7 +22,7 @@ class RememberMeService
|
||||
private readonly UserReadRepositoryInterface $userReadRepository,
|
||||
private readonly UserWriteRepositoryInterface $userWriteRepository,
|
||||
private readonly RememberTokenRepositoryInterface $rememberTokenRepository,
|
||||
private readonly AuthPermissionGateway $permissionGateway,
|
||||
private readonly PermissionService $permissionService,
|
||||
private readonly AuthSessionTenantContextService $authSessionTenantContextService,
|
||||
private readonly SessionStoreInterface $sessionStore,
|
||||
private readonly CookieStoreInterface $cookieStore,
|
||||
@@ -101,7 +102,7 @@ class RememberMeService
|
||||
}
|
||||
$userId = (int) $user['id'];
|
||||
if ($userId > 0) {
|
||||
$this->permissionGateway->warmUserPermissions($userId, true);
|
||||
$this->permissionService->getUserPermissions($userId, true);
|
||||
$this->authSessionTenantContextService->hydrateForUser($userId);
|
||||
if ((bool) $this->sessionStore->get('no_active_tenant', false)) {
|
||||
// Enforce the same tenant policy as interactive login.
|
||||
|
||||
Reference in New Issue
Block a user