0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Show posts authored by current user.

The current logic allows showing of all EXCEPT the current users posts
(when the current user is an author).

This fixes that.
This commit is contained in:
Robert Jackson 2014-07-31 17:23:08 -04:00
parent a04562b349
commit 7ca51764d6
No known key found for this signature in database
GPG key ID: B3D10EF8171F7219

View file

@ -35,7 +35,7 @@ var PostsPostRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, load
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;
}