Merge pull request 'sops: make symlinks relative' (#102) from Mic92-mic92 into main
All checks were successful
build / test (push) Successful in 20s
All checks were successful
build / test (push) Successful in 20s
This commit is contained in:
commit
43c1b2e2e1
@ -60,7 +60,7 @@ def add_member(group_folder: Path, source_folder: Path, name: str) -> None:
|
||||
f"Cannot add user {name}. {user_target} exists but is not a symlink"
|
||||
)
|
||||
os.remove(user_target)
|
||||
user_target.symlink_to(source)
|
||||
user_target.symlink_to(os.path.relpath(source, user_target.parent))
|
||||
|
||||
|
||||
def remove_member(group_folder: Path, name: str) -> None:
|
||||
|
@ -123,7 +123,8 @@ def allow_member(group_folder: Path, source_folder: Path, name: str) -> None:
|
||||
f"Cannot add user {name}. {user_target} exists but is not a symlink"
|
||||
)
|
||||
os.remove(user_target)
|
||||
user_target.symlink_to(source)
|
||||
|
||||
user_target.symlink_to(os.path.relpath(source, user_target.parent))
|
||||
update_keys(group_folder.parent, collect_keys_for_path(group_folder.parent))
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user