Skip to content

Commit

Permalink
Add link only option to posix file source
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Nov 9, 2024
1 parent 2106c58 commit b8b5160
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/galaxy/files/sources/posix.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@
DEFAULT_ENFORCE_SYMLINK_SECURITY = True
DEFAULT_DELETE_ON_REALIZE = False
DEFAULT_ALLOW_SUBDIR_CREATION = True
DEFAULT_LINK_ONLY = False


class PosixFilesSourceProperties(FilesSourceProperties, total=False):
root: str
enforce_symlink_security: bool
delete_on_realize: bool
allow_subdir_creation: bool
link_only: bool


class PosixFilesSource(BaseFilesSource):
Expand All @@ -50,6 +52,7 @@ def __init__(self, **kwd: Unpack[PosixFilesSourceProperties]):
self.root = props.get("root")
if not self.root:
self.writable = False
self.link_only = props.get("link_only", DEFAULT_LINK_ONLY)
self.enforce_symlink_security = props.get("enforce_symlink_security", DEFAULT_ENFORCE_SYMLINK_SECURITY)
self.delete_on_realize = props.get("delete_on_realize", DEFAULT_DELETE_ON_REALIZE)
self.allow_subdir_creation = props.get("allow_subdir_creation", DEFAULT_ALLOW_SUBDIR_CREATION)
Expand Down

0 comments on commit b8b5160

Please sign in to comment.