Fix bug and typing in library_datasets.py

This commit is contained in:
John Chilton
2021-10-14 00:51:10 -04:00
parent 32cf97d78a
commit 14fb067c4e
2 changed files with 3 additions and 4 deletions
@@ -456,8 +456,9 @@ class LibraryDatasetsController(BaseGalaxyAPIController, UsesVisualizationMixin,
path = os.path.join(full_dir, path)
if unsafe_walk(path, allowlist=[full_dir] + trans.app.config.user_library_import_symlink_allowlist, username=username):
# the path is a dir and contains files that symlink outside the user dir
error = 'User attempted to import a path that resolves to a path outside of their import dir: %s -> %s', \
path, os.path.realpath(path)
error = 'User attempted to import a path that resolves to a path outside of their import dir: %s -> %s' % (
path, os.path.realpath(path)
)
if trans.app.config.user_library_import_check_permissions:
error += ' or is not readable for them.'
log.error(error)
-2
View File
@@ -741,8 +741,6 @@ check_untyped_defs = False
check_untyped_defs = False
[mypy-galaxy.webapps.galaxy.api.plugins]
check_untyped_defs = False
[mypy-galaxy.webapps.galaxy.api.library_datasets]
check_untyped_defs = False
[mypy-galaxy.webapps.galaxy.api.library_contents]
check_untyped_defs = False
[mypy-galaxy.webapps.galaxy.api.jobs]