Add feature to disable IP whitelist #2707

This commit is contained in:
Martin Lensment 2015-06-29 12:31:47 +03:00
parent 5a0fd06e20
commit ffebff72dd
6 changed files with 32 additions and 2 deletions

View file

@ -24,6 +24,8 @@ class WhiteIp < ActiveRecord::Base
class << self
def registrar_ip_white?(ip)
return true unless Setting.registrar_ip_whitelist_enabled
at = WhiteIp.arel_table
WhiteIp.where(
at[:interface].eq(REGISTRAR).or(