Some more simplification
This commit is contained in:
parent
64ece74404
commit
62ac12deff
@ -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
|
# If post is not published, check that the user is also the author of
|
||||||
# the post. If not, return 404.
|
# the post. If not, return 404.
|
||||||
if post.properties.status != "published":
|
if post.properties.status != "published":
|
||||||
if current_user.is_authenticated:
|
if not (current_user.is_authenticated and post.has_method('PUT')):
|
||||||
if not post.has_method('PUT'):
|
|
||||||
abort(403)
|
|
||||||
else:
|
|
||||||
abort(403)
|
abort(403)
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user