Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: Display 'Leave share' instead of 'Delete'
Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr authored and backportbot[bot] committed Sep 11, 2024
commit c80dd9dfecbf5dc6cf8a827ef62f9c27eea7a776
4 changes: 4 additions & 0 deletions apps/files_sharing/lib/Controller/ShareAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ protected function formatShare(IShare $share, ?Node $recipientNode = null): arra
$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();
Expand Down
2 changes: 2 additions & 0 deletions apps/files_sharing/lib/ResponseDefinitions.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
* file_target: string,
* has_preview: bool,
* hide_download: 0|1,
* is-mount-root: bool,
* id: string,
* item_mtime: int,
* item_permissions?: int,
Expand All @@ -48,6 +49,7 @@
* label: string,
* mail_send: 0|1,
* mimetype: string,
* mount-type: string,
* note: string,
* parent: null,
* password?: null|string,
Expand Down
8 changes: 8 additions & 0 deletions apps/files_sharing/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@
"file_target",
"has_preview",
"hide_download",
"is-mount-root",
"id",
"item_mtime",
"item_size",
Expand All @@ -488,6 +489,7 @@
"label",
"mail_send",
"mimetype",
"mount-type",
"note",
"parent",
"path",
Expand Down Expand Up @@ -543,6 +545,9 @@
1
]
},
"is-mount-root": {
"type": "boolean"
},
"id": {
"type": "string"
},
Expand Down Expand Up @@ -591,6 +596,9 @@
"mimetype": {
"type": "string"
},
"mount-type": {
"type": "string"
},
"note": {
"type": "string"
},
Expand Down