mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
Screened ip address can be edited, deleted, and changed to allow or block.
This commit is contained in:
@ -23,6 +23,11 @@ module ScreeningModel
|
||||
self.action_type ||= self.class.actions[self.class.df_action]
|
||||
end
|
||||
|
||||
def action_name=(arg)
|
||||
raise ArgumentError.new("Invalid action type #{arg}") if arg.nil? or !self.class.actions.has_key?(arg.to_sym)
|
||||
self.action_type = self.class.actions[arg.to_sym]
|
||||
end
|
||||
|
||||
def record_match!
|
||||
self.match_count += 1
|
||||
self.last_match_at = Time.zone.now
|
||||
|
Reference in New Issue
Block a user