I'm struggling to make users of a certain role bypass a rule set by the following extension.
https://github.com/theAkito/flarum-limit-post-length/tree/0.1.0
I want the rule to apply to all users, except users in certain roles, like administrators & moderators.
I imagined, I could just call getActor inside (new Extend\Validator(PostValidator::class))->configure(function ($flarumValidator, $validator), but it doesn't work. Now, I don't understand how I would stop this validation rule from applying, when I have to define the permission check somewhere else.
I would really appreciate if someone could give me a hint on how to proceed. This is mind-numbing.
Source problem depicted in the following discussion.
https://discuss.flarum.org/d/32725-how-to-allow-moderators-to-bypass-rules