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