The bug mentioned here: 'min trust to edit post' setting interfering with Discourse Encrypt - bug - Discourse Meta
Using the guardian was the best and safest approach.
However, there is a situation when the user cannot edit posts. For example when
min_trust_to_edit_post is set higher than the user trust level.
Therefore we can simply check if the user is author of the post.