]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix: Display 'Leave share' instead of 'Delete'
authorMarcel Klehr <mklehr@gmx.net>
Tue, 20 Aug 2024 09:31:21 +0000 (11:31 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Wed, 11 Sep 2024 11:44:35 +0000 (11:44 +0000)
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
apps/files_sharing/lib/Controller/ShareAPIController.php
apps/files_sharing/lib/ResponseDefinitions.php
apps/files_sharing/openapi.json

index c7b9235bb2711eceb644c9d766a11500ae49bb1c..5b32de90787b97275d623cb39b159c86050543a7 100644 (file)
@@ -191,6 +191,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();
index aa1ee004971a55d884fc39c6683f2d1719ad61e4..2d2e30eb790ffeef656489426bc49738a758e0fa 100644 (file)
@@ -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?: string,
index 661134126d3b88ab0bbaa1673b71cc62469f8718..772b6643a3c3770dd36de00f22212ba8a46d6287 100644 (file)
                     "file_target",
                     "has_preview",
                     "hide_download",
+                    "is-mount-root",
                     "id",
                     "item_mtime",
                     "item_size",
                     "label",
                     "mail_send",
                     "mimetype",
+                    "mount-type",
                     "note",
                     "parent",
                     "path",
                             1
                         ]
                     },
+                    "is-mount-root": {
+                        "type": "boolean"
+                    },
                     "id": {
                         "type": "string"
                     },
                     "mimetype": {
                         "type": "string"
                     },
+                    "mount-type": {
+                        "type": "string"
+                    },
                     "note": {
                         "type": "string"
                     },