[PR #11] [MERGED] Big refactoring, bug fixes, and new features: #14

Closed
opened 2026-03-04 00:59:43 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/sirtoobii/vaultwarden_ldap_sync/pull/11
Author: @sirtoobii
Created: 2/9/2025
Status: Merged
Merged: 4/6/2025
Merged by: @sirtoobii

Base: mainHead: big-refactor


📝 Commits (4)

  • e75b551 Big refactoring, bug fixes, and new features:
  • 774cd5d Remove deprecated version reference, thanks @kaindlnetwork, fix printing of detected changes
  • d532760 Make the reason for intended program exit more clear.
  • 79feaee Use correct variable to check if new users should be adopted.

📊 Changes

17 files changed (+698 additions, -494 deletions)

View changed files

📝 .env.dist (+8 -0)
📝 Dockerfile (+1 -1)
📝 Readme.md (+2 -2)
📝 docker-compose.yaml (+0 -2)
scripts/sync.py (+0 -260)
📝 tests/test_Changes.py (+58 -40)
📝 tests/test_SyncState.py (+37 -39)
vaultwarden_ldap_sync/VaultwardenConnector.py (+0 -128)
📝 vaultwarden_user_sync/__init__.py (+0 -0)
vaultwarden_user_sync/backends/__init__.py (+0 -0)
📝 vaultwarden_user_sync/backends/localstore.py (+41 -21)
vaultwarden_user_sync/backends/vaultwarden.py (+138 -0)
vaultwarden_user_sync/compare.py (+204 -0)
📝 vaultwarden_user_sync/email_sources/__init__.py (+0 -0)
📝 vaultwarden_user_sync/email_sources/ldap.py (+6 -1)
vaultwarden_user_sync/email_sources/random.py (+23 -0)
vaultwarden_user_sync/sync.py (+180 -0)

📄 Description

  • Replaced dicts with dataclasses
  • Restructured the folder structure to be more Pythonic
  • Fixed issue where the email source was only updated once
  • Re-enable users who reappear in the email source
  • Added an option to adopt users
  • Added an option to reset the local state

Resolves: #10


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/sirtoobii/vaultwarden_ldap_sync/pull/11 **Author:** [@sirtoobii](https://github.com/sirtoobii) **Created:** 2/9/2025 **Status:** ✅ Merged **Merged:** 4/6/2025 **Merged by:** [@sirtoobii](https://github.com/sirtoobii) **Base:** `main` ← **Head:** `big-refactor` --- ### 📝 Commits (4) - [`e75b551`](https://github.com/sirtoobii/vaultwarden_ldap_sync/commit/e75b551de415c94872265002eb6a00ef8a30a8be) Big refactoring, bug fixes, and new features: - [`774cd5d`](https://github.com/sirtoobii/vaultwarden_ldap_sync/commit/774cd5d014897c5cbd9c204912fd354ba64704b4) Remove deprecated version reference, thanks @kaindlnetwork, fix printing of detected changes - [`d532760`](https://github.com/sirtoobii/vaultwarden_ldap_sync/commit/d532760361c3c240fde488b6c5251715f8b12760) Make the reason for intended program exit more clear. - [`79feaee`](https://github.com/sirtoobii/vaultwarden_ldap_sync/commit/79feaee4d90a928c3d3ec2a57086f311464e47e8) Use correct variable to check if new users should be adopted. ### 📊 Changes **17 files changed** (+698 additions, -494 deletions) <details> <summary>View changed files</summary> 📝 `.env.dist` (+8 -0) 📝 `Dockerfile` (+1 -1) 📝 `Readme.md` (+2 -2) 📝 `docker-compose.yaml` (+0 -2) ➖ `scripts/sync.py` (+0 -260) 📝 `tests/test_Changes.py` (+58 -40) 📝 `tests/test_SyncState.py` (+37 -39) ➖ `vaultwarden_ldap_sync/VaultwardenConnector.py` (+0 -128) 📝 `vaultwarden_user_sync/__init__.py` (+0 -0) ➕ `vaultwarden_user_sync/backends/__init__.py` (+0 -0) 📝 `vaultwarden_user_sync/backends/localstore.py` (+41 -21) ➕ `vaultwarden_user_sync/backends/vaultwarden.py` (+138 -0) ➕ `vaultwarden_user_sync/compare.py` (+204 -0) 📝 `vaultwarden_user_sync/email_sources/__init__.py` (+0 -0) 📝 `vaultwarden_user_sync/email_sources/ldap.py` (+6 -1) ➕ `vaultwarden_user_sync/email_sources/random.py` (+23 -0) ➕ `vaultwarden_user_sync/sync.py` (+180 -0) </details> ### 📄 Description - Replaced dicts with dataclasses - Restructured the folder structure to be more Pythonic - Fixed issue where the email source was only updated once - Re-enable users who reappear in the email source - Added an option to adopt users - Added an option to reset the local state Resolves: #10 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 00:59:43 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden_ldap_sync#14
No description provided.