Created
June 9, 2023 15:32
-
-
Save dannon/7ecea8588049683e19371902ec9309c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/galaxy/files/sources/galaxy.py b/lib/galaxy/files/sources/galaxy.py | |
index ebbf9d303e..e1a02a30ab 100644 | |
--- a/lib/galaxy/files/sources/galaxy.py | |
+++ b/lib/galaxy/files/sources/galaxy.py | |
@@ -12,6 +12,26 @@ from .posix import ( | |
PosixFilesSourceProperties, | |
) | |
+class UserHomeFilesSource(PosixFilesSource): | |
+ plugin_type = "gxuserhome" | |
+ | |
+ def __init__(self, **kwd: Unpack[PosixFilesSourceProperties]): | |
+ posix_kwds: PosixFilesSourceProperties = dict( | |
+ id="_userhome", | |
+ root="/home/${user.username}/", | |
+ label="User Home Directory", | |
+ doc="Galaxy User's Home Directory", | |
+ writable=True, | |
+ ) | |
+ posix_kwds.update(kwd) | |
+ super().__init__(**posix_kwds) | |
+ | |
+ def get_prefix(self) -> Optional[str]: | |
+ return None | |
+ | |
+ def get_scheme(self) -> str: | |
+ return "gxuserhome" | |
+ | |
class UserFtpFilesSource(PosixFilesSource): | |
plugin_type = "gxftp" | |
@@ -77,4 +97,4 @@ class UserLibraryImportFilesSource(PosixFilesSource): | |
return "gxuserimport" | |
-__all__ = ("UserFtpFilesSource", "LibraryImportFilesSource", "UserLibraryImportFilesSource") | |
+__all__ = ("UserFtpFilesSource", "LibraryImportFilesSource", "UserLibraryImportFilesSource", "UserHomeFilesSource") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment