Make ACLs match when the address is equal
This commit is contained in:
parent
a16b45eb6a
commit
5e9414365c
1 changed files with 2 additions and 2 deletions
|
@ -1,9 +1,9 @@
|
|||
class Acl < ActiveRecord::Base
|
||||
def self.match(address, domain = nil)
|
||||
if domain
|
||||
condition = Acl.where("address >> ? OR domain = ?", address, domain)
|
||||
condition = Acl.where("address >>= ? OR domain = ?", address, domain)
|
||||
else
|
||||
condition = Acl.where("address >> ?", address)
|
||||
condition = Acl.where("address >>= ?", address)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue