myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2593] trunk/lib/authorization.rb: made check fun


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)

Revision
2593
Author
dgc
Date
2011-05-25 18:17:36 -0400 (Wed, 25 May 2011)

Log Message

made check function accept zero as user to match current_user

Modified Paths

Diff

Modified: trunk/lib/authorization.rb (2592 => 2593)


--- 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]