Skip to content

Commit

Permalink
Fixing issue where user could not edit own post
Browse files Browse the repository at this point in the history
  • Loading branch information
willdoran committed Jan 29, 2019
1 parent b4f9889 commit d30f594
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/App/Repository/PostRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ public function getEntity(array $data = null)
}

if (!$this->postPermissions->canUserSeeAuthor($user, new Post($data), $this->form_repo)
&& !($user->id === $data['user_id'])
&& ($data['author_realname'] || $data['user_id'] || $data['author_email'])) {
// @todo move to formatter. That where this normally happens
unset($data['author_realname']);
Expand Down

0 comments on commit d30f594

Please sign in to comment.