|
From: | noreply |
Subject: | [myexperiment-hackers] [2593] trunk/lib/authorization.rb: made check function accept zero as user to match current_user |
Date: | Wed, 25 May 2011 18:17:36 -0400 (EDT) |
made check function accept zero as user to match current_user
--- trunk/lib/authorization.rb 2011-05-25 22:05:41 UTC (rev 2592)
+++ trunk/lib/authorization.rb 2011-05-25 22:17:36 UTC (rev 2593)
@@ -102,6 +102,8 @@
raise "Missing action in authorisation check" if opts[:action].nil?
+ opts[:user] = nil if opts[:user] == 0
+
if opts[:model].nil? && opts[:object].nil? && (opts[:object_type].nil? || opts[:object_id])
raise "Missing object / model in authorisation check"
end
[Prev in Thread] | Current Thread | [Next in Thread] |