X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/8eef66cee2837ce5df84906dbcbf4c5a8df3bea2..a16b45eb6a26ad7738e5d919faaf515708507cbf:/app/models/acl.rb diff --git a/app/models/acl.rb b/app/models/acl.rb index e19c6988b..9938984aa 100644 --- a/app/models/acl.rb +++ b/app/models/acl.rb @@ -6,4 +6,12 @@ class Acl < ActiveRecord::Base condition = Acl.where("address >> ?", address) end end + + def self.no_account_creation(address, domain = nil) + self.match(address, domain).where(:k => "no_account_creation").exists? + end + + def self.no_trace_download(address, domain = nil) + self.match(address, domain).where(:k => "no_trace_download").exists? + end end