X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a4c23cd89f0037960998ffd46da7f410ba16f190..f49c815cb531874d15796b0ae6f8030e5acbbb09:/app/models/acl.rb diff --git a/app/models/acl.rb b/app/models/acl.rb index 26285cef3..aa503f40c 100644 --- a/app/models/acl.rb +++ b/app/models/acl.rb @@ -42,12 +42,7 @@ class Acl < ApplicationRecord end def self.allow_account_creation(address, options = {}) - acls = Acl.where("address >>= ?", address) - .and(Acl.where(:k => "allow_account_creation")) - acls = acls.and(Acl.where(:domain => options[:domain])) if options[:domain] - acls = acls.and(Acl.where(:mx => options[:mx])) if options[:mx] - - !acls.empty? + match(address, options).exists?(:k => "allow_account_creation") end def self.no_note_comment(address, domain = nil)