aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2024-08-20 11:31:21 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-09-11 11:48:25 +0000
commit1e08f91408058686b970a46f7c30ace6b5e27bab (patch)
tree40c177be9b12f2ca133fdd14aa57b1ed5b2049be /apps/files_sharing/lib
parent674dad0f1fefec10fa25134fadd4abe3776f67be (diff)
downloadnextcloud-server-1e08f91408058686b970a46f7c30ace6b5e27bab.tar.gz
nextcloud-server-1e08f91408058686b970a46f7c30ace6b5e27bab.zip
fix: Display 'Leave share' instead of 'Delete'
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php4
-rw-r--r--apps/files_sharing/lib/ResponseDefinitions.php2
2 files changed, 6 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php
index 10e9a033071..8b7a711c0ee 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -159,6 +159,10 @@ class ShareAPIController extends OCSController {
$result['item_permissions'] = $node->getPermissions();
}
+ // See MOUNT_ROOT_PROPERTYNAME dav property
+ $result['is-mount-root'] = $node->getInternalPath() === '';
+ $result['mount-type'] = $node->getMountPoint()->getMountType();
+
$result['mimetype'] = $node->getMimetype();
$result['has_preview'] = $this->previewManager->isAvailable($node);
$result['storage_id'] = $node->getStorage()->getId();
diff --git a/apps/files_sharing/lib/ResponseDefinitions.php b/apps/files_sharing/lib/ResponseDefinitions.php
index 9a6ef199169..774e4c17e00 100644
--- a/apps/files_sharing/lib/ResponseDefinitions.php
+++ b/apps/files_sharing/lib/ResponseDefinitions.php
@@ -22,6 +22,7 @@ namespace OCA\Files_Sharing;
* file_target: string,
* has_preview: bool,
* hide_download: 0|1,
+ * is-mount-root: bool,
* id: string,
* item_mtime: int,
* item_permissions?: int,
@@ -31,6 +32,7 @@ namespace OCA\Files_Sharing;
* label: ?string,
* mail_send: 0|1,
* mimetype: string,
+ * mount-type: string,
* note: string,
* parent: null,
* password?: null|string,