How can I write a plugin to allow TL1 to ignore users?

I found this code, which seems to be exactly the place I want to override:

https://github.com/discourse/discourse/blob/e1f8014acd2877cda539b14b4694d9c077f6b36d/lib/guardian.rb#L471

I see where it checks the user’s trust level and only allows them if their level is >= :member …I think if I change that to :basic it will let TL1 users ignore.

This code is part of guardian.rb

Is it possible to override this? (Or accomplish the same goal elsewhere in the code?)

1 Like

I also have similar question. How to override TopicGuardian in our plugin code so that our subclass of TopicGuardian is used instead of the original TopicGuardian to mixin to the main Guardian class?

I found the answer here: Overriding user_guardian.rb in a plugin (no fork necessary!) - #18 by leighno5

2 Likes