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.
Cette révision appartient à :
Franciskid
2026-07-26 20:30:40 +02:00
Parent aa8317d081
révision abbb0d448f
+3 -1
Voir le fichier
@@ -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;
}