From 9c4cf7367a453001b19b29c637e7aaf8b41ce494 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Tue, 14 Dec 2021 13:30:14 +0100 Subject: Fix share owner not being displayed in sharing tab This only concerns subfolder and files inside a shared folder and is used as fallback when the OCS api returns a empty result, because it only works on the shared folder and not the content inside of it. This unify the tab with the folder list. This offers a less descriptive share information but making the OCS api returns all the details even for the subfolder would very probably be bad for performance (since we would need to fetch the shares for all the parent folders until we found one or are in the root folder). Signed-off-by: Carl Schwan Signed-off-by: nextcloud-command --- apps/files_sharing/src/views/SharingTab.vue | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'apps/files_sharing/src') diff --git a/apps/files_sharing/src/views/SharingTab.vue b/apps/files_sharing/src/views/SharingTab.vue index e08ce261522..bdc81c91ccc 100644 --- a/apps/files_sharing/src/views/SharingTab.vue +++ b/apps/files_sharing/src/views/SharingTab.vue @@ -293,6 +293,19 @@ export default { // interval update this.expirationInterval = setInterval(this.updateExpirationSubtitle, 10000, share) } + } else if (this.fileInfo && this.fileInfo.shareOwnerId !== undefined ? this.fileInfo.shareOwnerId !== OC.currentUser : false) { + // Fallback to compare owner and current user. + this.sharedWithMe = { + displayName: this.fileInfo.shareOwner, + title: t( + 'files_sharing', + 'Shared with you by {owner}', + { owner: this.fileInfo.shareOwner }, + undefined, + { escape: false } + ), + user: this.fileInfo.shareOwnerId, + } } }, -- cgit v1.2.3