Skip to content

Commit

Permalink
Merge pull request #18856 from mvdbeek/fix_check_dataset
Browse files Browse the repository at this point in the history
[24.1] Fix check dataset check
  • Loading branch information
mvdbeek authored Sep 20, 2024
2 parents b057b4c + 1e94e04 commit a9160dd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/galaxy/webapps/galaxy/controllers/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
encode_dataset_user,
)
from galaxy.datatypes.sniff import guess_ext
from galaxy.exceptions import RequestParameterInvalidException
from galaxy.exceptions import (
InsufficientPermissionsException,
RequestParameterInvalidException,
)
from galaxy.managers.hdas import (
HDADeserializer,
HDAManager,
Expand Down Expand Up @@ -106,7 +109,7 @@ def _check_dataset(self, trans, hda_id):
if not data:
raise web.httpexceptions.HTTPNotFound(f"Invalid reference dataset id: {str(hda_id)}.")
if not self._can_access_dataset(trans, data):
return trans.show_error_message("You are not allowed to access this dataset")
raise InsufficientPermissionsException("You are not allowed to access this dataset")
self.app.hda_manager.ensure_dataset_on_disk(trans, data)
return data

Expand Down

0 comments on commit a9160dd

Please sign in to comment.