diff options
author | fenn-cs <fenn25.fn@gmail.com> | 2024-08-22 23:25:42 +0100 |
---|---|---|
committer | nfebe <fenn25.fn@gmail.com> | 2024-11-09 10:33:17 +0100 |
commit | dd6d7a0aabdd31329f7360ff73ad32598957a466 (patch) | |
tree | 104b451f3802a41f3559b553e37803b905fda4be /apps/dav/lib | |
parent | 56be31a436661e9948c7d4b64f82863d47d50e79 (diff) | |
download | nextcloud-server-dd6d7a0aabdd31329f7360ff73ad32598957a466.tar.gz nextcloud-server-dd6d7a0aabdd31329f7360ff73ad32598957a466.zip |
fix(Federation): Show some icon for federated users on shares
Signed-off-by: nfebe <fenn25.fn@gmail.com>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/FilesPlugin.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index dbd4e522517..ded3f321e13 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php @@ -58,6 +58,7 @@ 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_FEDERATED_PROPERTYNAME = '{http://nextcloud.org/ns}is-federated'; 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'; @@ -119,6 +120,7 @@ class FilesPlugin extends ServerPlugin { $server->protectedProperties[] = self::DATA_FINGERPRINT_PROPERTYNAME; $server->protectedProperties[] = self::HAS_PREVIEW_PROPERTYNAME; $server->protectedProperties[] = self::MOUNT_TYPE_PROPERTYNAME; + $server->protectedProperties[] = self::IS_FEDERATED_PROPERTYNAME; $server->protectedProperties[] = self::SHARE_NOTE; // normally these cannot be changed (RFC4918), but we want them modifiable through PROPPATCH @@ -414,6 +416,11 @@ class FilesPlugin extends ServerPlugin { $propFind->handle(self::DISPLAYNAME_PROPERTYNAME, function () use ($node) { return $node->getName(); }); + + $propFind->handle(self::IS_FEDERATED_PROPERTYNAME, function () use ($node) { + return $node->getFileInfo()->getMountPoint() + instanceof \OCA\Files_Sharing\External\Mount; + }); } if ($node instanceof File) { |