myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [2971] trunk/lib/rest.rb: fixed case where permis


From: noreply
Subject: [myexperiment-hackers] [2971] trunk/lib/rest.rb: fixed case where permissions were being reset to private in the API
Date: Tue, 20 Mar 2012 11:45:30 +0000 (UTC)

Revision
2971
Author
dgc
Date
2012-03-20 11:45:30 +0000 (Tue, 20 Mar 2012)

Log Message

fixed case where permissions were being reset to private in the API

Modified Paths

Diff

Modified: trunk/lib/rest.rb (2970 => 2971)


--- trunk/lib/rest.rb	2012-03-20 11:44:54 UTC (rev 2970)
+++ trunk/lib/rest.rb	2012-03-20 11:45:30 UTC (rev 2971)
@@ -922,15 +922,16 @@
   share_mode  = 7
   update_mode = 6
 
-  # clear out any permission records for this contributable
+  # process permission elements
 
-  ob.contribution.policy.permissions.each do |p|
-    p.destroy
-  end
+  if permissions
 
-  # process permission elements
+    # clear out any permission records for this contributable
 
-  if permissions
+    ob.contribution.policy.permissions.each do |p|
+      p.destroy
+    end
+
     permissions.find('permission').each do |permission|
 
       # handle public privileges

reply via email to

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