Skip to content

Commit

Permalink
remove check_ownership from dataset_collections.contents
Browse files Browse the repository at this point in the history
... since this api only needs to `check_accessible` as it is not modifying a collection
  • Loading branch information
ahmedhamidawan committed Feb 9, 2024
1 parent 1e8e885 commit f4d5e9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy/managers/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/webapps/galaxy/services/dataset_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f4d5e9c

Please sign in to comment.