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