Context:
The current behaviour of post merging implies the deletion of one or more posts from the database; only one of the merged posts (the one selected in the "merge into post" drop down) will remain in the database after the merge is completed.
Merging posts requires only the "Manage (move, merge, etc.) thread" general moderator permission.
This behaviour fails to meet two expectations of the current permission model when a user only has the "Manage (move, merge, etc.) thread" permission:
- The user, without the "Edit post" permission, can edit a post using the merge function.
- The user, without the "Hard-delete post" permission, can delete a post from the database using the merge function.
As there is no way of "unmerging" posts this behaviour also makes it very difficult to recover from a merge by mistake, requiring either manual changes in the database and/or a partial restore of a backup, if—hopefully—there is one.
My suggestion is to change the behaviour of the post merge action to soft-delete the original posts, copying the content into a new post with the merged text. An alternative suggestion is to keep the original post data in some form in the database (perhaps a new message state?) and provide an action to revert a merge automatically.
A second, related, suggestion is to disallow editing when merging posts if the user doesn't have the adequate permission ("Edit post").