Skip to content

Commit b4e238f

Browse files
CarlSchwannextcloud-command
authored andcommitted
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>
1 parent 8ba1a2f commit b4e238f

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

apps/files_sharing/js/dist/files_sharing_tab.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/files_sharing/js/dist/files_sharing_tab.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/files_sharing/src/views/SharingTab.vue

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,19 @@ export default {
293293
// interval update
294294
this.expirationInterval = setInterval(this.updateExpirationSubtitle, 10000, share)
295295
}
296+
} else if (this.fileInfo && this.fileInfo.shareOwnerId !== undefined ? this.fileInfo.shareOwnerId !== OC.currentUser : false) {
297+
// Fallback to compare owner and current user.
298+
this.sharedWithMe = {
299+
displayName: this.fileInfo.shareOwner,
300+
title: t(
301+
'files_sharing',
302+
'Shared with you by {owner}',
303+
{ owner: this.fileInfo.shareOwner },
304+
undefined,
305+
{ escape: false }
306+
),
307+
user: this.fileInfo.shareOwnerId,
308+
}
296309
}
297310
},
298311

0 commit comments

Comments
 (0)