From 61b574b130c3ab09a4f2566540e58c32bde9f68c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 7 Oct 2020 12:32:16 +0200 Subject: [PATCH] Show unique displayname context in the user share list entries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- .../lib/Controller/ShareAPIController.php | 3 +++ apps/files_sharing/src/components/SharingEntry.vue | 5 ++++- .../src/components/SharingEntrySimple.vue | 4 ++++ apps/files_sharing/src/mixins/SharesMixin.js | 4 ++++ apps/files_sharing/src/models/Share.js | 4 ++++ apps/files_sharing/src/views/SharingList.vue | 11 +++++++++++ .../tests/Controller/ShareAPIControllerTest.php | 9 +++++++++ 7 files changed, 39 insertions(+), 1 deletion(-) diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index aaca16b32e..2a2e261481 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -235,6 +235,9 @@ class ShareAPIController extends OCSController { $sharedWith = $this->userManager->get($share->getSharedWith()); $result['share_with'] = $share->getSharedWith(); $result['share_with_displayname'] = $sharedWith !== null ? $sharedWith->getDisplayName() : $share->getSharedWith(); + $result['share_with_displayname_unique'] = $sharedWith !== null ? ( + $sharedWith->getEMailAddress() !== '' ? $sharedWith->getEMailAddress() : $sharedWith->getUID() + ) : $share->getSharedWith(); $result['status'] = []; $userStatuses = $this->userStatusManager->getUserStatuses([$share->getSharedWith()]); diff --git a/apps/files_sharing/src/components/SharingEntry.vue b/apps/files_sharing/src/components/SharingEntry.vue index 55bdbb8fdc..cb558900dc 100644 --- a/apps/files_sharing/src/components/SharingEntry.vue +++ b/apps/files_sharing/src/components/SharingEntry.vue @@ -30,7 +30,7 @@ :menu-position="'left'" :url="share.shareWithAvatar" />