myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [2817] branches/rails2/lib/authorization.rb: fixe


From: noreply
Subject: [myexperiment-hackers] [2817] branches/rails2/lib/authorization.rb: fixed calls to logger in auth code
Date: Wed, 16 Nov 2011 19:10:45 -0500 (EST)

Revision
2817
Author
dgc
Date
2011-11-16 19:10:45 -0500 (Wed, 16 Nov 2011)

Log Message

fixed calls to logger in auth code

Modified Paths

Diff

Modified: branches/rails2/lib/authorization.rb (2816 => 2817)


--- branches/rails2/lib/authorization.rb	2011-11-17 00:10:12 UTC (rev 2816)
+++ branches/rails2/lib/authorization.rb	2011-11-17 00:10:45 UTC (rev 2817)
@@ -329,7 +329,7 @@
       
       unless found_thing
         # search didn't yield any results - the "thing" wasn't found; can't authorize unknown objects
-        logger.error("UNEXPECTED ERROR - Couldn't find object to be authorized:(#{thing_type}, #{thing_id}); action: #{action_name}; user: #{user_id}")
+        Rails.logger.error("UNEXPECTED ERROR - Couldn't find object to be authorized:(#{thing_type}, #{thing_id}); action: #{action_name}; user: #{user_id}")
         return false
       else
         if ["Workflow", "Blog", "Blob", "Pack", "Contribution"].include?(thing_type)
@@ -790,8 +790,8 @@
       # original contributor not found, but the Contribution entry still exists -
       # this is an error in associations then, because all dependent items
       # should have been deleted along with the contributor entry; log the error
-      logger.error("UNEXPECTED ERROR - Contributor object missing for an existing contribution: (#{thing_contribution.class.name}, #{thing_contribution.id})")
-      logger.error("EXCEPTION:" + e)
+      Rails.logger.error("UNEXPECTED ERROR - Contributor object missing for an existing contribution: (#{thing_contribution.class.name}, #{thing_contribution.id})")
+      Rails.logger.error("EXCEPTION:" + e)
       return nil
     end
   end

reply via email to

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