X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/1b675a6dee47ec5fd00bbab30d7f10a38d885109..f2ca25b75c57ab772a8f9063bea82a6bc43fed78:/app/models/acl.rb?ds=inline 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)