projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a16b45e
)
Make ACLs match when the address is equal
author
Tom Hughes
<tom@compton.nu>
Sun, 12 Feb 2012 14:53:07 +0000
(14:53 +0000)
committer
Tom Hughes
<tom@compton.nu>
Sun, 12 Feb 2012 14:53:07 +0000
(14:53 +0000)
app/models/acl.rb
patch
|
blob
|
history
diff --git
a/app/models/acl.rb
b/app/models/acl.rb
index 9938984aa89a3d83cef907430c6288fed3aabe07..2db7fb76522a0342324d235367ae51d0c5932c97 100644
(file)
--- a/
app/models/acl.rb
+++ b/
app/models/acl.rb
@@
-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