diff options
author | Julius Härtl <jus@bitgrid.net> | 2021-03-03 15:20:58 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2021-03-04 11:25:45 +0300 |
commit | 69c2864aca83beb73fafcd406a8b5f4cb4cd87a9 (patch) | |
tree | 78d304272e03465e35ffac10119711432270c057 /apps/files_sharing/src | |
parent | 9b573c6bd5df281833f455c9770826bc74283d5d (diff) |
Add appconfig to always show the unique label of a sharee
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/files_sharing/src')
-rw-r--r-- | apps/files_sharing/src/components/SharingInput.vue | 4 | ||||
-rw-r--r-- | apps/files_sharing/src/services/ConfigService.js | 9 |
2 files changed, 12 insertions, 1 deletions
diff --git a/apps/files_sharing/src/components/SharingInput.vue b/apps/files_sharing/src/components/SharingInput.vue index f5b664bd07a..e2d6eef03fc 100644 --- a/apps/files_sharing/src/components/SharingInput.vue +++ b/apps/files_sharing/src/components/SharingInput.vue @@ -405,7 +405,9 @@ export default { */ formatForMultiselect(result) { let desc - if ((result.value.shareType === this.SHARE_TYPES.SHARE_TYPE_REMOTE + if (result.value.shareType === this.SHARE_TYPES.SHARE_TYPE_USER && this.config.shouldAlwaysShowUnique) { + desc = result.shareWithDisplayNameUnique ?? '' + } else if ((result.value.shareType === this.SHARE_TYPES.SHARE_TYPE_REMOTE || result.value.shareType === this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP ) && result.value.server) { desc = t('files_sharing', 'on {server}', { server: result.value.server }) diff --git a/apps/files_sharing/src/services/ConfigService.js b/apps/files_sharing/src/services/ConfigService.js index 0971bc387a3..940435fc7f3 100644 --- a/apps/files_sharing/src/services/ConfigService.js +++ b/apps/files_sharing/src/services/ConfigService.js @@ -230,6 +230,15 @@ export default class Config { } /** + * @returns {boolean} + * @readonly + * @memberof Config + */ + get shouldAlwaysShowUnique() { + return (OC.getCapabilities().files_sharing?.sharee?.always_show_unique === true) + } + + /** * Is sharing with groups allowed ? * * @returns {boolean} |