diff options
author | Carl Schwan <carl@carlschwan.eu> | 2021-12-14 15:30:14 +0300 |
---|---|---|
committer | nextcloud-command <nextcloud-command@users.noreply.github.com> | 2021-12-15 00:59:58 +0300 |
commit | 9c4cf7367a453001b19b29c637e7aaf8b41ce494 (patch) | |
tree | 44888991abd3fb0b2b3d8e75dbb35fc5e68f2410 /apps/files_sharing/src/views | |
parent | 98b637f29166d172cfb63f2cd24315ed0452c071 (diff) |
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 <carl@carlschwan.eu>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps/files_sharing/src/views')
-rw-r--r-- | apps/files_sharing/src/views/SharingTab.vue | 13 |
1 files changed, 13 insertions, 0 deletions
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, + } } }, |