mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 03:19:10 +00:00
FIX: Clients get stucked in readonly mode if messageBus fails.
This commit is contained in:
parent
50b2152ef7
commit
c06824e9c2
@ -79,9 +79,12 @@ export function ajax() {
|
||||
args.success = (data, textStatus, xhr) => {
|
||||
handleLogoff(xhr);
|
||||
|
||||
if (xhr.getResponseHeader('Discourse-Readonly')) {
|
||||
Ember.run(() => Discourse.Site.currentProp('isReadOnly', true));
|
||||
}
|
||||
Ember.run(() => {
|
||||
Discourse.Site.currentProp(
|
||||
'isReadOnly',
|
||||
!!xhr.getResponseHeader('Discourse-Readonly')
|
||||
);
|
||||
});
|
||||
|
||||
if (args.returnXHR) {
|
||||
data = { result: data, xhr: xhr };
|
||||
|
Loading…
x
Reference in New Issue
Block a user