From bd2e1a8c3853b1233bf36306125bfb587dbafd56 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Mon, 22 Nov 2021 19:44:00 +0100 Subject: [PATCH] FIX: Don't hit permalink-check if not authorized (#15039) --- app/assets/javascripts/discourse/app/routes/unknown.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/javascripts/discourse/app/routes/unknown.js b/app/assets/javascripts/discourse/app/routes/unknown.js index 5f74049896e..8fddb0991d0 100644 --- a/app/assets/javascripts/discourse/app/routes/unknown.js +++ b/app/assets/javascripts/discourse/app/routes/unknown.js @@ -6,6 +6,10 @@ export default DiscourseRoute.extend({ model(_, transition) { const path = transition.intent.url; + if (!this.currentUser && this.siteSettings.login_required) { + return; + } + return ajax("/permalink-check.json", { data: { path }, }).then((results) => {