There are several ways to prevent this.
The first is not to send sensitive data to the client. Store the message ID in the session variables so that the user cannot edit it. This may or may not be an option depending on your architecture.
The next approach is to convert the direct link to an indirect one. For example, instead of sending postids = {23452, 57232, 91031}, the client needs to send an opaque list {1,2,3} to display a drop-down list. Only the server knows that 1 means 23452, 2 means 57232 and so on. Thus, the user cannot change any parameter that you do not want.
- -, . , , 3 html - {userId = 13223, postId = 923, role = author}. , postId=923&userId=13223&role=author. (SHA-1 MD5) . . SHA-1('postId=923&userId=13223&role=author&MySuperSecretKey'). , . ProtectedParameters=userId,postId,role.
, . , .
, . , , . .