Unverified Commit 4eab9714 authored by Ahmed Awan's avatar Ahmed Awan Committed by mvdbeek
Browse files

remove `check_ownership` from `dataset_collections.contents`

... since this api only needs to `check_accessible` as it is not modifying a collection
parent 8c3d967a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -807,7 +807,7 @@ class DatasetCollectionManager:
            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(
+1 −1
Original line number Diff line number Diff line
@@ -250,7 +250,7 @@ class DatasetCollectionsService(ServiceBase, UsesLibraryMixinItems):
                "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