aboutsummaryrefslogtreecommitdiffstats
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:54:35 +0000
commitc80dd9dfecbf5dc6cf8a827ef62f9c27eea7a776 (patch)
tree038a056c13fc509c70e99dddc7e35b5f6c779d09
parent87605dd358dba3c2b4806e9a2dad45c6fd5441bd (diff)
downloadnextcloud-server-c80dd9dfecbf5dc6cf8a827ef62f9c27eea7a776.tar.gz
nextcloud-server-c80dd9dfecbf5dc6cf8a827ef62f9c27eea7a776.zip
fix: Display 'Leave share' instead of 'Delete'
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php4
-rw-r--r--apps/files_sharing/lib/ResponseDefinitions.php2
-rw-r--r--apps/files_sharing/openapi.json8
3 files changed, 14 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php
index 48ba46150b3..1c642dcd952 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -189,6 +189,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 313cf82bd51..70dd72b64e6 100644
--- a/apps/files_sharing/lib/ResponseDefinitions.php
+++ b/apps/files_sharing/lib/ResponseDefinitions.php
@@ -39,6 +39,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,
@@ -48,6 +49,7 @@ namespace OCA\Files_Sharing;
* label: string,
* mail_send: 0|1,
* mimetype: string,
+ * mount-type: string,
* note: string,
* parent: null,
* password?: null|string,
diff --git a/apps/files_sharing/openapi.json b/apps/files_sharing/openapi.json
index 87f36d4331f..e0f3a1397e5 100644
--- a/apps/files_sharing/openapi.json
+++ b/apps/files_sharing/openapi.json
@@ -480,6 +480,7 @@
"file_target",
"has_preview",
"hide_download",
+ "is-mount-root",
"id",
"item_mtime",
"item_size",
@@ -488,6 +489,7 @@
"label",
"mail_send",
"mimetype",
+ "mount-type",
"note",
"parent",
"path",
@@ -543,6 +545,9 @@
1
]
},
+ "is-mount-root": {
+ "type": "boolean"
+ },
"id": {
"type": "string"
},
@@ -591,6 +596,9 @@
"mimetype": {
"type": "string"
},
+ "mount-type": {
+ "type": "string"
+ },
"note": {
"type": "string"
},