Modified: branches/events/lib/rest.rb (3113 => 3114)
--- branches/events/lib/rest.rb 2012-08-25 13:41:30 UTC (rev 3113)
+++ branches/events/lib/rest.rb 2012-08-25 15:30:38 UTC (rev 3114)
@@ -1123,10 +1123,10 @@
if success
case "#{action} #{new_version || edit_version}"
- when "create false": Activity.create(:subject => opts[:user], :action ="" 'create', :objekt => ob)
- when "create true": Activity.create(:subject => opts[:user], :action ="" 'create version', :objekt => ob)
- when "edit false": Activity.create(:subject => opts[:user], :action ="" 'edit', :objekt => ob)
- when "edit true": Activity.create(:subject => opts[:user], :action ="" 'edit version', :objekt => ob, :extra => ob.version)
+ when "create false": Activity.create(:subject => opts[:user], :action ="" 'create', :objekt => ob, :auth => ob)
+ when "create true": Activity.create(:subject => opts[:user], :action ="" 'create', :objekt => ob.versions.last, :auth => ob)
+ when "edit false": Activity.create(:subject => opts[:user], :action ="" 'edit', :objekt => ob, :auth => ob)
+ when "edit true": Activity.create(:subject => opts[:user], :action ="" 'edit', :objekt => ob, :extra => ob.version, :auth => ob.workflow)
end
end
@@ -1263,10 +1263,10 @@
if success
case "#{action} #{new_version || edit_version}"
- when "create false": Activity.create(:subject => opts[:user], :action ="" 'create', :objekt => ob)
- when "create true": Activity.create(:subject => opts[:user], :action ="" 'create version', :objekt => ob)
- when "edit false": Activity.create(:subject => opts[:user], :action ="" 'edit', :objekt => ob)
- when "edit true": Activity.create(:subject => opts[:user], :action ="" 'edit version', :objekt => ob, :extra => ob.version)
+ when "create false": Activity.create(:subject => opts[:user], :action ="" 'create', :objekt => ob, :auth => ob)
+ when "create true": Activity.create(:subject => opts[:user], :action ="" 'create', :objekt => ob.versions.last, :auth => ob)
+ when "edit false": Activity.create(:subject => opts[:user], :action ="" 'edit', :objekt => ob, :auth => ob)
+ when "edit true": Activity.create(:subject => opts[:user], :action ="" 'edit', :objekt => ob, :extra => ob.version, :auth => ob.blob)
end
end