Project

General

Profile

Bug #6652

Updated by Tom Clegg almost 9 years ago

Ways to create a new repo: 
 * Admin gear menu → Repositories → "Add a new repository" button -- *fail* 
 * User menu → Manage Account → "Add new repository" button -- success 
 * @arv repository create --repository '{"name":"myusername/foobar"}'@ -- *fail* 

 I suspect this is a problem with validation order: 
 * @validate@ methods run first, including @:valid_owner@ in source:services/api/app/models/repository.rb 
 * @before_create@ methods run later, including @:ensure_owner_uuid_is_permitted@ in source:services/api/app/models/arvados_model.rb, which is where we set owner_uuid to current_user.uuid if it's not set yet. 

 If these happened in the reverse order, @:valid_owner@ would pass. 

Back