refactor(arch): enforce gateway compliance and remove service-wrapping gateways
This commit is contained in:
@@ -5,7 +5,6 @@ namespace MintyPHP\Service\Tenant;
|
||||
use MintyPHP\Repository\Org\DepartmentRepositoryInterface;
|
||||
use MintyPHP\Repository\Tenant\TenantRepositoryInterface;
|
||||
use MintyPHP\Repository\Tenant\UserTenantRepositoryInterface;
|
||||
use MintyPHP\Service\Access\PermissionGateway;
|
||||
use MintyPHP\Service\Access\PermissionService;
|
||||
|
||||
class TenantScopeService
|
||||
@@ -14,7 +13,7 @@ class TenantScopeService
|
||||
private readonly TenantRepositoryInterface $tenantRepository,
|
||||
private readonly DepartmentRepositoryInterface $departmentRepository,
|
||||
private readonly UserTenantRepositoryInterface $userTenantRepository,
|
||||
private readonly PermissionGateway $permissionGateway
|
||||
private readonly PermissionService $permissionService
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -167,6 +166,6 @@ class TenantScopeService
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->permissionGateway->userHas($userId, PermissionService::TENANT_SCOPE_GLOBAL);
|
||||
return $this->permissionService->userHas($userId, PermissionService::TENANT_SCOPE_GLOBAL);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user