1 class Acl < ActiveRecord::Base
2 def self.match(address, domain = nil)
4 Acl.where("address >>= ? OR domain = ?", address, domain)
6 Acl.where("address >>= ?", address)
10 def self.no_account_creation(address, domain = nil)
11 match(address, domain).where(:k => "no_account_creation").exists?
14 def self.no_note_comment(address, domain = nil)
15 match(address, domain).where(:k => "no_note_comment").exists?
18 def self.no_trace_download(address, domain = nil)
19 match(address, domain).where(:k => "no_trace_download").exists?