Skip to content

Commit

Permalink
Merge pull request #47495 from nextcloud/artonge/dept/delegat_is_encr…
Browse files Browse the repository at this point in the history
…ypted_to_e2ee

feat: Delegate is-encrypted handling to the e2ee app
  • Loading branch information
artonge authored Aug 27, 2024
2 parents 0fdcaa5 + ac1d8cd commit d2c3726
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions apps/dav/lib/Connector/Sabre/FilesPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ class FilesPlugin extends ServerPlugin {
public const HAS_PREVIEW_PROPERTYNAME = '{http://nextcloud.org/ns}has-preview';
public const MOUNT_TYPE_PROPERTYNAME = '{http://nextcloud.org/ns}mount-type';
public const MOUNT_ROOT_PROPERTYNAME = '{http://nextcloud.org/ns}is-mount-root';
public const IS_ENCRYPTED_PROPERTYNAME = '{http://nextcloud.org/ns}is-encrypted';
public const METADATA_ETAG_PROPERTYNAME = '{http://nextcloud.org/ns}metadata_etag';
public const UPLOAD_TIME_PROPERTYNAME = '{http://nextcloud.org/ns}upload_time';
public const CREATION_TIME_PROPERTYNAME = '{http://nextcloud.org/ns}creation_time';
Expand Down Expand Up @@ -121,7 +120,6 @@ public function initialize(Server $server) {
$server->protectedProperties[] = self::DATA_FINGERPRINT_PROPERTYNAME;
$server->protectedProperties[] = self::HAS_PREVIEW_PROPERTYNAME;
$server->protectedProperties[] = self::MOUNT_TYPE_PROPERTYNAME;
$server->protectedProperties[] = self::IS_ENCRYPTED_PROPERTYNAME;
$server->protectedProperties[] = self::SHARE_NOTE;

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

$propFind->handle(self::IS_ENCRYPTED_PROPERTYNAME, function () use ($node) {
return $node->getFileInfo()->isEncrypted() ? '1' : '0';
});

$requestProperties = $propFind->getRequestedProperties();

if (in_array(self::SUBFILE_COUNT_PROPERTYNAME, $requestProperties, true)
Expand Down

0 comments on commit d2c3726

Please sign in to comment.