Ticket #3 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

anonymous slot creation uses nil.id

Reported by: adamb@… Owned by: somebody
Priority: major Milestone: Park Place 0.8
Component: component1 Version: 1.0
Keywords: None Cc: None

Description

the code below assumes that @user is not nil. @user is nil when authentication headers are not present, as is the case with anonymous slot creation. s3 design docs suggest this is allowed. in the mean time, i hacked my installation to substitute admin for the user if it's nil.

#(starts on line 183 of parkplace/controllers.rb)
begin
  slot = bucket.find_slot(oid)
  slot.update_attributes(:owner_id => @user.id, :meta => meta, :obj => fileinfo)
rescue NoSuchKey
  slot = Slot.create(:name => oid, :owner_id => @user.id, :meta => meta, :obj => fileinfo)
  bucket.add_child(slot)
end

Change History

Changed 3 years ago by why

  • status changed from new to closed
  • resolution set to fixed

Okay, the owner now defaults to whoever owns the bucket.

Note: See TracTickets for help on using tickets.