Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/DAV/ACLPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ACLPlugin extends ServerPlugin {
public const ACL_BASE_PERMISSION_PROPERTYNAME = '{http://nextcloud.org/ns}acl-base-permission';

private ?Server $server = null;
private ?IUser $user = null;
private readonly ?IUser $user;
/** @var array<int, bool> */
private array $canManageACL = [];

Expand All @@ -55,11 +55,14 @@ public function __construct(
private readonly ACLManagerFactory $aclManagerFactory,
private readonly IL10N $l10n,
) {
$this->user = $this->userSession->getUser();
if ($this->user === null) {
return;
}
}

public function initialize(Server $server): void {
$this->server = $server;
$this->user = $this->userSession->getUser(); // move to constructor?

$this->server->on('propFind', $this->propFind(...));
$this->server->on('propPatch', $this->propPatch(...));
Expand Down