Commit Graph

11 Commits

Author SHA1 Message Date
DavHau
37a49a14f4 vars: fix re-generate behavior for dependencies of shared vars (#5001)
fixes https://git.clan.lol/clan/clan-core/issues/3791

This fixes multiple issues we had when re-generating shared vars.

Problem 1: shared vars are re-generated for each individual machine instead of just once (see #3791)

Problem 2: When a shared var was re-generated for one machine, dependent vars on other machines did not get re-generated, leading to broken state

Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/5001
2025-09-02 14:54:24 +00:00
Jörg Thalheim
dc5485d9f1 ruff: replace asserts outside of tests with Exceptions 2025-08-25 13:06:04 +02:00
DavHau
c308fd63a7 vars: delete old var when changing share
When changing a password from non-shared to shared, we want to remove the old one
2025-08-25 10:37:46 +00:00
DavHau
815c6c9438 vars: move generation functions to clan_lib 2025-08-19 18:05:53 +07:00
lassulus
c760561dbd refactor: remove _serialized field and implement efficient vars selection
- Remove _serialized field from vars interface to prevent serialization
  errors with throwing passBackend field
- Implement direct selection of generator fields using multi-select syntax
- Refactor vars_generators() to use new Generator.from_flake() method that
  selects only safe fields (avoiding non-serializable values)
- Remove unused legacy methods: Generator.from_json(), Var.from_json(),
  Prompt.from_json()
- Update precaching to match new selection approach

This fixes the serialization errors that were preventing vars from working
with the new password-store implementation by avoiding the problematic
_serialized field entirely.
2025-07-03 18:53:36 +02:00
Raymond Barbiero
4117eb2f37 clanCore/vars: allow mode to be set
fmt
2025-04-25 11:29:43 +02:00
lassulus
70ff7fcc2f vars: allow setting files as needed for activation 2024-12-19 13:05:05 +01:00
DavHau
b64422679e vars: commit files for clan vars set
fixes #2601
2024-12-17 15:56:08 +07:00
lassulus
82fb1edc37 vars: add file mode 2024-12-04 23:30:39 +01:00
lassulus
e6eaa3cc03 vars password-store: add neededForUsers option 2024-12-03 22:28:39 +01:00
Jörg Thalheim
c9e80f38ca vars: make interface more type-safe 2024-11-26 17:08:26 +01:00