Don't show Try Again for access errors on topics

This commit is contained in:
riking 2014-07-17 17:50:37 -07:00
parent c47a70e390
commit 349003ee5e
2 changed files with 8 additions and 4 deletions

View File

@ -833,6 +833,7 @@ Discourse.PostStream = Em.Object.extend({
// If the result is 403 it means invalid access // If the result is 403 it means invalid access
if (status === 403) { if (status === 403) {
topic.set('errorTitle', I18n.t('topic.invalid_access.title')); topic.set('errorTitle', I18n.t('topic.invalid_access.title'));
topic.set('noRetry', true);
if (Discourse.User.current()) { if (Discourse.User.current()) {
topic.set('message', I18n.t('topic.invalid_access.description')); topic.set('message', I18n.t('topic.invalid_access.description'));
} else { } else {

View File

@ -122,11 +122,14 @@
{{#if message}} {{#if message}}
{{message}} {{message}}
{{#unless currentUser}}
<button {{action showLogin}} class='btn btn-primary btn-small'><i class="fa fa-user"></i>{{i18n log_in}}</button>
{{/unless}}
{{/if}} {{/if}}
{{#if noRetry}}
{{#unless currentUser}}
<button {{action showLogin}} class='btn btn-primary topic-retry'><i class="fa fa-user"></i>{{i18n log_in}}</button>
{{/unless}}
{{else}}
<button class="btn btn-primary topic-retry" {{action retryLoading}}>{{i18n errors.buttons.again}}</button> <button class="btn btn-primary topic-retry" {{action retryLoading}}>{{i18n errors.buttons.again}}</button>
{{/if}}
</div> </div>
{{#if retrying}} {{#if retrying}}
<div class='spinner'>{{i18n loading}}</div> <div class='spinner'>{{i18n loading}}</div>