mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Screened ip address can be edited, deleted, and changed to allow or block.
This commit is contained in:
parent
b8d586251c
commit
7d582fbee3
16 changed files with 259 additions and 16 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue