From 4e6b68477d9fe4005bff6f3e984cc9a944bc8dd4 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 2 Feb 2022 03:54:34 -0500 Subject: [PATCH] PDF reader: Annotation name display changes - Show creator's name in groups even when it's the current user - Don't show name for external annotations --- chrome/content/zotero/xpcom/annotations.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/xpcom/annotations.js b/chrome/content/zotero/xpcom/annotations.js index 5fa92bc8b9..2b00f0c234 100644 --- a/chrome/content/zotero/xpcom/annotations.js +++ b/chrome/content/zotero/xpcom/annotations.js @@ -118,12 +118,10 @@ Zotero.Annotations = new function () { o.type = item.annotationType; o.isExternal = item.annotationIsExternal; o.isAuthor = !item.createdByUserID || item.createdByUserID == Zotero.Users.getCurrentUserID(); - if (!o.isAuthor) { + if (!o.isExternal && item.library.libraryType == 'group') { o.authorName = Zotero.Users.getName(item.createdByUserID); } - // TODO: Replace this with the actual code that checks if user is a group admin - let isGroupAdmin = false; - o.readOnly = o.isExternal || (!o.isAuthor && !isGroupAdmin); + o.readOnly = o.isExternal || !o.isAuthor; if (o.type == 'highlight') { o.text = item.annotationText; }