refactor: migrate to scoped execution contexts

Signed-off-by: Sebastian <krupinski01@gmail.com>
This commit is contained in:
2026-07-27 00:50:43 -04:00
parent 9d48710d02
commit 3a68d03114
6 changed files with 60 additions and 60 deletions
+5 -5
View File
@@ -4,8 +4,8 @@ declare(strict_types=1);
namespace KTXM\ServiceDav\Backends;
use KTXC\SessionIdentity;
use KTXC\SessionTenant;
use KTXC\Context\IdentityContextInterface;
use KTXC\Context\TenantContextInterface;
use KTXM\DocumentsManager\Manager as DocumentsManager;
use Sabre\DAV\Collection;
use Sabre\DAV\Exception\Forbidden;
@@ -23,8 +23,8 @@ class FilesRootNode extends Collection
{
public function __construct(
private readonly DocumentsManager $manager,
private readonly SessionIdentity $identity,
private readonly SessionTenant $tenant,
private readonly IdentityContextInterface $identityContext,
private readonly TenantContextInterface $tenantContext,
) {}
public function getName(): string
@@ -36,7 +36,7 @@ class FilesRootNode extends Collection
public function getChildren(): array
{
$nodes = [];
$services = $this->manager->serviceList($this->tenant->identifier(), $this->identity->identifier());
$services = $this->manager->serviceList($this->tenantContext->identifier(), $this->identityContext->identifier());
foreach ($services as $providerId => $providerServices) {
foreach ($providerServices as $serviceId => $service) {