Skip to content

Commit ae9c61e

Browse files
committed
debt: Delegate is-encrypted handling to the e2ee app
Signed-off-by: Louis Chemineau <louis@chmn.me>
1 parent 6d31abd commit ae9c61e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

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

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

1010
use OC\AppFramework\Http\Request;
11+
use OC\Files\Node\Folder;
1112
use OCP\Constants;
13+
use OCP\Files\File;
1214
use OCP\Files\ForbiddenException;
1315
use OCP\Files\StorageNotAvailableException;
1416
use OCP\FilesMetadata\Exceptions\FilesMetadataException;
@@ -53,7 +55,6 @@ class FilesPlugin extends ServerPlugin {
5355
public const HAS_PREVIEW_PROPERTYNAME = '{http://nextcloud.org/ns}has-preview';
5456
public const MOUNT_TYPE_PROPERTYNAME = '{http://nextcloud.org/ns}mount-type';
5557
public const MOUNT_ROOT_PROPERTYNAME = '{http://nextcloud.org/ns}is-mount-root';
56-
public const IS_ENCRYPTED_PROPERTYNAME = '{http://nextcloud.org/ns}is-encrypted';
5758
public const METADATA_ETAG_PROPERTYNAME = '{http://nextcloud.org/ns}metadata_etag';
5859
public const UPLOAD_TIME_PROPERTYNAME = '{http://nextcloud.org/ns}upload_time';
5960
public const CREATION_TIME_PROPERTYNAME = '{http://nextcloud.org/ns}creation_time';
@@ -121,7 +122,6 @@ public function initialize(Server $server) {
121122
$server->protectedProperties[] = self::DATA_FINGERPRINT_PROPERTYNAME;
122123
$server->protectedProperties[] = self::HAS_PREVIEW_PROPERTYNAME;
123124
$server->protectedProperties[] = self::MOUNT_TYPE_PROPERTYNAME;
124-
$server->protectedProperties[] = self::IS_ENCRYPTED_PROPERTYNAME;
125125
$server->protectedProperties[] = self::SHARE_NOTE;
126126

127127
// normally these cannot be changed (RFC4918), but we want them modifiable through PROPPATCH
@@ -419,10 +419,6 @@ public function handleGetProperties(PropFind $propFind, \Sabre\DAV\INode $node)
419419
return $node->getSize();
420420
});
421421

422-
$propFind->handle(self::IS_ENCRYPTED_PROPERTYNAME, function () use ($node) {
423-
return $node->getFileInfo()->isEncrypted() ? '1' : '0';
424-
});
425-
426422
$requestProperties = $propFind->getRequestedProperties();
427423

428424
if (in_array(self::SUBFILE_COUNT_PROPERTYNAME, $requestProperties, true)

0 commit comments

Comments
 (0)