Loading lib/galaxy/managers/collections.py +5 −1 Original line number Diff line number Diff line Loading @@ -267,7 +267,11 @@ class DatasetCollectionManager: if recursive: for dataset in dataset_collection_instance.collection.dataset_instances: try: self.hda_manager.error_unless_owner(dataset, user=trans.get_user(), current_history=trans.history) except hdas.HistoryDatasetAssociationNoHistoryException: log.info("Cannot delete HistoryDatasetAssociation {}, HistoryDatasetAssociation has no associated History, cannot verify owner".format(dataset.id)) continue if not dataset.deleted: dataset.deleted = True Loading lib/galaxy/managers/hdas.py +7 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,10 @@ from galaxy.managers import ( log = logging.getLogger(__name__) class HistoryDatasetAssociationNoHistoryException(Exception): pass class HDAManager(datasets.DatasetAssociationManager, secured.OwnableManagerMixin, taggable.TaggableManagerMixin, Loading Loading @@ -69,9 +73,11 @@ class HDAManager(datasets.DatasetAssociationManager, """ Use history to see if current user owns HDA. """ history = hda.history if self.user_manager.is_admin(user, trans=kwargs.get("trans", None)): return True history = hda.history if history is None: raise HistoryDatasetAssociationNoHistoryException # allow anonymous user to access current history # TODO: some dup here with historyManager.is_owner but prevents circ import # TODO: awkward kwarg (which is my new band name); this may not belong here - move to controller? Loading Loading
lib/galaxy/managers/collections.py +5 −1 Original line number Diff line number Diff line Loading @@ -267,7 +267,11 @@ class DatasetCollectionManager: if recursive: for dataset in dataset_collection_instance.collection.dataset_instances: try: self.hda_manager.error_unless_owner(dataset, user=trans.get_user(), current_history=trans.history) except hdas.HistoryDatasetAssociationNoHistoryException: log.info("Cannot delete HistoryDatasetAssociation {}, HistoryDatasetAssociation has no associated History, cannot verify owner".format(dataset.id)) continue if not dataset.deleted: dataset.deleted = True Loading
lib/galaxy/managers/hdas.py +7 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,10 @@ from galaxy.managers import ( log = logging.getLogger(__name__) class HistoryDatasetAssociationNoHistoryException(Exception): pass class HDAManager(datasets.DatasetAssociationManager, secured.OwnableManagerMixin, taggable.TaggableManagerMixin, Loading Loading @@ -69,9 +73,11 @@ class HDAManager(datasets.DatasetAssociationManager, """ Use history to see if current user owns HDA. """ history = hda.history if self.user_manager.is_admin(user, trans=kwargs.get("trans", None)): return True history = hda.history if history is None: raise HistoryDatasetAssociationNoHistoryException # allow anonymous user to access current history # TODO: some dup here with historyManager.is_owner but prevents circ import # TODO: awkward kwarg (which is my new band name); this may not belong here - move to controller? Loading