mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Merge pull request #4551 from jaswilli/editor-401-modal
Do not display "auth failed" modal on clean posts.
This commit is contained in:
commit
1e4a3cb204
1 changed files with 7 additions and 3 deletions
|
@ -20,12 +20,16 @@ var ApplicationRoute = Ember.Route.extend(SimpleAuth.ApplicationRouteMixin, Shor
|
|||
|
||||
actions: {
|
||||
authorizationFailed: function () {
|
||||
var currentRoute = this.get('controller').get('currentRouteName');
|
||||
var currentRoute = this.get('controller').get('currentRouteName'),
|
||||
editorController;
|
||||
|
||||
if (currentRoute.split('.')[0] === 'editor') {
|
||||
this.send('openModal', 'auth-failed-unsaved', this.controllerFor(currentRoute));
|
||||
editorController = this.controllerFor(currentRoute);
|
||||
|
||||
return;
|
||||
if (editorController.get('isDirty')) {
|
||||
this.send('openModal', 'auth-failed-unsaved', editorController);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this._super();
|
||||
|
|
Loading…
Add table
Reference in a new issue