Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
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 <[email protected]>
Signed-off-by: nextcloud-command <[email protected]>
  • Loading branch information
CarlSchwan authored and nextcloud-command committed Dec 14, 2021
commit 9c4cf7367a453001b19b29c637e7aaf8b41ce494
2 changes: 1 addition & 1 deletion apps/files_sharing/js/dist/files_sharing_tab.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/files_sharing/js/dist/files_sharing_tab.js.map

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions apps/files_sharing/src/views/SharingTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}
},

Expand Down