diff --git a/pillar/web/nodes/custom/posts.py b/pillar/web/nodes/custom/posts.py index 8e6cfa34..1b0845d9 100644 --- a/pillar/web/nodes/custom/posts.py +++ b/pillar/web/nodes/custom/posts.py @@ -50,10 +50,7 @@ def posts_view(project_id=None, project_url=None, url=None): # If post is not published, check that the user is also the author of # the post. If not, return 404. if post.properties.status != "published": - if current_user.is_authenticated: - if not post.has_method('PUT'): - abort(403) - else: + if not (current_user.is_authenticated and post.has_method('PUT')): abort(403) return render_template(