mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fix bug and typing in library_datasets.py
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user