Merge pull request #4488 from Gargol/issue-4415

Loads correct screen after author refreshes page in editor
This commit is contained in:
Hannah Wolfe 2014-11-20 19:45:51 +00:00
commit 266034c993

View File

@ -18,10 +18,6 @@ var EditorEditRoute = AuthenticatedRoute.extend(base, {
post = this.store.getById('post', postId);
if (post) {
return post;
}
paginationSettings = {
id: postId,
status: 'all',
@ -36,7 +32,7 @@ var EditorEditRoute = AuthenticatedRoute.extend(base, {
return self.store.find('post', paginationSettings).then(function (records) {
var post = records.get('firstObject');
if (user.get('isAuthor') && post.isAuthoredByUser(user)) {
if (user.get('isAuthor') && !post.isAuthoredByUser(user)) {
// do not show the post if they are an author but not this posts author
post = null;
}