Skip to content

Commit

Permalink
fix: Display 'Leave share' instead of 'Delete'
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
  • Loading branch information
marcelklehr authored and backportbot[bot] committed Sep 11, 2024
1 parent 87605dd commit c80dd9d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
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

0 comments on commit c80dd9d

Please sign in to comment.