Skip to content

Commit e577308

Browse files
committed
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>
1 parent 98b637f commit e577308

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

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)