mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Refactor SpamRulesEnforcer so that each spam rule is in its own class
This commit is contained in:
@@ -252,7 +252,7 @@ class Guardian
|
||||
end
|
||||
|
||||
def can_create_post?(parent)
|
||||
!SpamRulesEnforcer.block?(@user) && (
|
||||
!SpamRule::AutoBlock.block?(@user) && (
|
||||
!parent ||
|
||||
!parent.category ||
|
||||
Category.post_create_allowed(self).where(:id => parent.category.id).count == 1
|
||||
|
||||
Reference in New Issue
Block a user