From 847d2b9141cce63b1dc5099b75f56d9c1bda1305 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 28 Jul 2022 15:58:17 -0400 Subject: [PATCH] fix: #10795, early return for selection tooltip based on calling user privilege --- public/src/client/topic/postTools.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/src/client/topic/postTools.js b/public/src/client/topic/postTools.js index 8b46eb3485..28b1119a3f 100644 --- a/public/src/client/topic/postTools.js +++ b/public/src/client/topic/postTools.js @@ -478,6 +478,10 @@ define('forum/topic/postTools', [ const selectionChangeFn = utils.debounce(selectionChange, 100); function handleSelectionTooltip() { + if (!ajaxify.data.privileges['topics:reply']) { + return; + } + hooks.onPage('action:posts.loaded', delayedTooltip); $(document).off('selectionchange', selectionChangeFn).on('selectionchange', selectionChangeFn);