Allow PUT method for owner on comment creation

Make use of the permission system and allow PUT method for the creator
of a Node of type comment. This enables comment owners to edit their
own posts.
This commit is contained in:
2019-04-09 01:09:08 +02:00
parent 26a09a900f
commit 3f3172e00e
2 changed files with 66 additions and 1 deletions

View File

@@ -149,6 +149,12 @@ def post_node_comment(parent_id: bson.ObjectId, markdown_msg: str, attachments:
rating_positive=0,
rating_negative=0,
attachments=attachments,
),
permissions=dict(
users=[dict(
user=current_user.objectid,
methods=['PUT'])
]
)
)
r, _, _, status = current_app.post_internal('nodes', comment)