From 349003ee5e75cf3726e79f1e92544ae1be3709e5 Mon Sep 17 00:00:00 2001 From: riking Date: Thu, 17 Jul 2014 17:50:37 -0700 Subject: [PATCH] Don't show Try Again for access errors on topics --- .../javascripts/discourse/models/post_stream.js | 1 + .../discourse/templates/topic.js.handlebars | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/discourse/models/post_stream.js b/app/assets/javascripts/discourse/models/post_stream.js index da79ba37d87..5cd0da074df 100644 --- a/app/assets/javascripts/discourse/models/post_stream.js +++ b/app/assets/javascripts/discourse/models/post_stream.js @@ -833,6 +833,7 @@ Discourse.PostStream = Em.Object.extend({ // If the result is 403 it means invalid access if (status === 403) { topic.set('errorTitle', I18n.t('topic.invalid_access.title')); + topic.set('noRetry', true); if (Discourse.User.current()) { topic.set('message', I18n.t('topic.invalid_access.description')); } else { diff --git a/app/assets/javascripts/discourse/templates/topic.js.handlebars b/app/assets/javascripts/discourse/templates/topic.js.handlebars index 83b76f0ebe9..7fce824a0b5 100644 --- a/app/assets/javascripts/discourse/templates/topic.js.handlebars +++ b/app/assets/javascripts/discourse/templates/topic.js.handlebars @@ -122,11 +122,14 @@ {{#if message}} {{message}} - {{#unless currentUser}} - - {{/unless}} {{/if}} - + {{#if noRetry}} + {{#unless currentUser}} + + {{/unless}} + {{else}} + + {{/if}} {{#if retrying}}
{{i18n loading}}