X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/d9d74825806615a539da950686ae801bbbf60e24..f1eb092c311510b60b8c9b00b64407780e2a0302:/apps/workbench/app/controllers/pipeline_instances_controller.rb diff --git a/apps/workbench/app/controllers/pipeline_instances_controller.rb b/apps/workbench/app/controllers/pipeline_instances_controller.rb index 27e8f5b51b..a618d43517 100644 --- a/apps/workbench/app/controllers/pipeline_instances_controller.rb +++ b/apps/workbench/app/controllers/pipeline_instances_controller.rb @@ -47,6 +47,13 @@ class PipelineInstancesController < ApplicationController component.delete :job end @object.state = 'New' + + # set owner_uuid to that of source, provided it is a project and wriable by current user + current_project = Group.find(source.owner_uuid) rescue nil + if (current_project && current_project.writable_by.andand.include?(current_user.uuid)) + @object.owner_uuid = source.owner_uuid + end + super end