FIX: Don't hit permalink-check if not authorized (#15039)

This commit is contained in:
Jarek Radosz 2021-11-22 19:44:00 +01:00 committed by GitHub
parent ceed48f321
commit bd2e1a8c38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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) => {