FIX: show lock glyph to a user without permissions to see quote (#6854)

FIX: show lock glyph to a user without permissions to see quote (#6854)

diff --git a/app/assets/javascripts/discourse/widgets/post-cooked.js.es6 b/app/assets/javascripts/discourse/widgets/post-cooked.js.es6
index bf3a323..84c6f70 100644
--- a/app/assets/javascripts/discourse/widgets/post-cooked.js.es6
+++ b/app/assets/javascripts/discourse/widgets/post-cooked.js.es6
@@ -163,9 +163,10 @@ export default class PostCooked {
           $blockQuote.showHtml(div, "fast", finished);
         })
         .catch(e => {
-          if (e.jqXHR.status === 404) {
+          if ([403, 404].includes(e.jqXHR.status)) {
+            const icon = e.jqXHR.status === 403 ? "lock" : "trash-o";
             $blockQuote.showHtml(
-              $(`<div class='expanded-quote'>${iconHTML("trash-o")}</div>`),
+              $(`<div class='expanded-quote'>${iconHTML(icon)}</div>`),
               "fast",
               finished
             );

GitHub sha: 51b13ec8

1 Like