From f4d5e9cf130f951f72b94018911b5c673d63baf2 Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Fri, 9 Feb 2024 09:57:59 -0600 Subject: [PATCH] remove `check_ownership` from `dataset_collections.contents` ... since this api only needs to `check_accessible` as it is not modifying a collection --- lib/galaxy/managers/collections.py | 2 +- lib/galaxy/webapps/galaxy/services/dataset_collections.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/managers/collections.py b/lib/galaxy/managers/collections.py index 56eb95fa2416..8db9037b55a5 100644 --- a/lib/galaxy/managers/collections.py +++ b/lib/galaxy/managers/collections.py @@ -802,7 +802,7 @@ def __get_history_collection_instance( raise RequestParameterInvalidException("History dataset collection association not found") # TODO: that sure looks like a bug, we can't check ownership using the history of the object we're checking ownership for ... history = getattr(trans, "history", collection_instance.history) - if check_ownership and collection_instance.history.published is False: + if check_ownership: self.history_manager.error_unless_owner(collection_instance.history, trans.user, current_history=history) if check_accessible: self.history_manager.error_unless_accessible( diff --git a/lib/galaxy/webapps/galaxy/services/dataset_collections.py b/lib/galaxy/webapps/galaxy/services/dataset_collections.py index 53b14d18d209..ee17bb053f75 100644 --- a/lib/galaxy/webapps/galaxy/services/dataset_collections.py +++ b/lib/galaxy/webapps/galaxy/services/dataset_collections.py @@ -248,7 +248,7 @@ def contents( "Parameter instance_type not being 'history' is not yet implemented." ) hdca: HistoryDatasetCollectionAssociation = self.collection_manager.get_dataset_collection_instance( - trans, "history", hdca_id, check_ownership=True + trans, "history", hdca_id ) # check to make sure the dsc is part of the validated hdca