Files
breadcrumb-the-shire/lib/Service/User/UserScopeGateway.php

29 lines
694 B
PHP
Raw Normal View History

2026-02-23 12:58:19 +01:00
<?php
namespace MintyPHP\Service\User;
use MintyPHP\Service\Tenant\TenantScopeService;
class UserScopeGateway
{
2026-03-04 15:56:58 +01:00
public function __construct(
private readonly TenantScopeService $tenantScopeService
) {
2026-02-23 12:58:19 +01:00
}
public function hasGlobalAccess(int $userId): bool
{
2026-03-04 15:56:58 +01:00
return $this->tenantScopeService->hasGlobalAccess($userId);
2026-02-23 12:58:19 +01:00
}
public function canAccess(string $resourceType, int $resourceId, int $userId): bool
{
2026-03-04 15:56:58 +01:00
return $this->tenantScopeService->canAccess($resourceType, $resourceId, $userId);
2026-02-23 12:58:19 +01:00
}
public function getUserTenantIds(int $userId): array
{
2026-03-04 15:56:58 +01:00
return $this->tenantScopeService->getUserTenantIds($userId);
2026-02-23 12:58:19 +01:00
}
}