From abbb0d448f15ead4e990f98ca664afd13d0f7085 Mon Sep 17 00:00:00 2001 From: Franciskid Date: Sun, 26 Jul 2026 20:30:40 +0200 Subject: [PATCH] hide share tags unless the viewer is a confirmed admin The check skipped hiding when the Users/Me lookup came back empty, which is the one case where we do not know who is looking. Only a positive administrator verdict skips it now. --- Jellyfin.Plugin.ShareLinks/Web/sharelinks.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jellyfin.Plugin.ShareLinks/Web/sharelinks.js b/Jellyfin.Plugin.ShareLinks/Web/sharelinks.js index 0613d78..3f30660 100644 --- a/Jellyfin.Plugin.ShareLinks/Web/sharelinks.js +++ b/Jellyfin.Plugin.ShareLinks/Web/sharelinks.js @@ -600,8 +600,10 @@ * the DOM. This is the web UI only - the tag is still in the API payload. */ async function hideShareTagsFromNonAdmins() { + // Deliberately only skipped for a confirmed administrator. If the lookup + // failed we do not know who this is, and the safe answer is to hide. var user = await getCurrentUser(); - if (!user || isAdministrator(user)) { + if (isAdministrator(user)) { return; }