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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user