X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a4c23cd89f0037960998ffd46da7f410ba16f190..821ebdd57b7e39e328fc95eedbb63ffc02c81983:/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)