Don't show Try Again for access errors on topics
This commit is contained in:
parent
c47a70e390
commit
349003ee5e
|
@ -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 {
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue