generated from Nodarx/template
refactor: migrate to scoped execution contexts
Signed-off-by: Sebastian <krupinski01@gmail.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user