diff --git a/lib/galaxy/jobs/__init__.py b/lib/galaxy/jobs/__init__.py index 0cf7d5356c3f..bdde3321ffdb 100644 --- a/lib/galaxy/jobs/__init__.py +++ b/lib/galaxy/jobs/__init__.py @@ -1456,7 +1456,7 @@ def _set_object_store_ids(self, job): # jobs may have this set. Skip this following code if that is the case. return - object_store_populator = ObjectStorePopulator(self.app) + object_store_populator = ObjectStorePopulator(self.app, job.user) object_store_id = self.get_destination_configuration("object_store_id", None) if object_store_id: object_store_populator.object_store_id = object_store_id diff --git a/lib/galaxy/objectstore/__init__.py b/lib/galaxy/objectstore/__init__.py index 1c3c0d69435d..904cacbdc8c2 100644 --- a/lib/galaxy/objectstore/__init__.py +++ b/lib/galaxy/objectstore/__init__.py @@ -1070,9 +1070,10 @@ class ObjectStorePopulator: datasets from a job end up with the same object_store_id. """ - def __init__(self, app): + def __init__(self, app, user): self.object_store = app.object_store self.object_store_id = None + self.user = user def set_object_store_id(self, data): # Create an empty file immediately. The first dataset will be diff --git a/lib/galaxy/tools/actions/__init__.py b/lib/galaxy/tools/actions/__init__.py index 50f6257c14fd..23428f1d3ea8 100644 --- a/lib/galaxy/tools/actions/__init__.py +++ b/lib/galaxy/tools/actions/__init__.py @@ -360,7 +360,7 @@ def execute(self, tool, trans, incoming=None, return_job=False, set_output_hid=T # datasets first, then create the associations parent_to_child_pairs = [] child_dataset_names = set() - object_store_populator = ObjectStorePopulator(app) + object_store_populator = ObjectStorePopulator(app, trans.user) async_tool = tool.tool_type == 'data_source_async' def handle_output(name, output, hidden=None): diff --git a/test/unit/tools/test_metadata.py b/test/unit/tools/test_metadata.py index 7e2a74253329..d21f771c60eb 100644 --- a/test/unit/tools/test_metadata.py +++ b/test/unit/tools/test_metadata.py @@ -169,7 +169,7 @@ def _create_output_dataset(self, **kwd): **kwd ) self.history.add_dataset(output_dataset) - ObjectStorePopulator(self.app).set_object_store_id(output_dataset) + ObjectStorePopulator(self.app, user=self.job.user).set_object_store_id(output_dataset) return output_dataset def _write_work_dir_file(self, filename, contents):