refactor(arch): enforce gateway compliance and remove service-wrapping gateways
This commit is contained in:
@@ -3,12 +3,11 @@
|
||||
namespace MintyPHP\Service\Import;
|
||||
|
||||
use MintyPHP\Http\SessionStoreInterface;
|
||||
use MintyPHP\Service\Access\PermissionGateway;
|
||||
use MintyPHP\Service\Access\PermissionService;
|
||||
use MintyPHP\Service\Audit\ImportAuditService;
|
||||
use MintyPHP\Service\Import\Profile\ImportProfileInterface;
|
||||
use MintyPHP\Service\Settings\SettingsDefaultsGateway;
|
||||
use MintyPHP\Service\User\UserScopeGateway;
|
||||
use MintyPHP\Service\Tenant\TenantScopeService;
|
||||
|
||||
class ImportService
|
||||
{
|
||||
@@ -28,9 +27,9 @@ class ImportService
|
||||
private readonly ImportAuditService $importAuditService,
|
||||
private readonly ImportStateStoreService $importStateStoreService,
|
||||
private readonly array $profiles,
|
||||
private readonly PermissionGateway $permissionGateway,
|
||||
private readonly PermissionService $permissionService,
|
||||
private readonly SettingsDefaultsGateway $settingsDefaultsGateway,
|
||||
private readonly UserScopeGateway $userScopeGateway,
|
||||
private readonly TenantScopeService $userScopeGateway,
|
||||
private readonly SessionStoreInterface $sessionStore
|
||||
) {
|
||||
}
|
||||
@@ -490,7 +489,7 @@ class ImportService
|
||||
|
||||
private function canImportAssignments(int $userId): bool
|
||||
{
|
||||
return $this->permissionGateway->userHas($userId, PermissionService::USERS_IMPORT_ASSIGNMENTS);
|
||||
return $this->permissionService->userHas($userId, PermissionService::USERS_IMPORT_ASSIGNMENTS);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user