Skip to content

Commit 95446ba

Browse files
committed
fixup! feat: add oc-ownerid and oc-permissions headers on PUT DAV requests
1 parent 7f38e4a commit 95446ba

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

apps/dav/lib/Connector/Sabre/AddExtraHeadersPlugin.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
*/
99
namespace OCA\DAV\Connector\Sabre;
1010

11-
use OCA\DAV\Connector\PermissionsTrait;
1211
use Psr\Log\LoggerInterface;
1312
use Sabre\DAV\Exception\NotFound;
1413
use Sabre\DAV\Server;
@@ -22,8 +21,6 @@
2221
*/
2322
class AddExtraHeadersPlugin extends \Sabre\DAV\ServerPlugin {
2423

25-
use PermissionsTrait;
26-
2724
private ?Server $server = null;
2825

2926
public function __construct(
@@ -64,10 +61,9 @@ private function afterPut(RequestInterface $request, ResponseInterface $response
6461
}
6562
}
6663

67-
$permissions = $this->getPermissionString(
68-
$this->isPublic,
69-
$node->getDavPermissions()
70-
);
64+
$permissions = $this->isPublic ? $node->getPublicDavPermissions() :
65+
$node->getDavPermissions();
66+
7167
$response->setHeader('X-NC-Permissions', $permissions);
7268
}
7369
}

0 commit comments

Comments
 (0)