Add per-entry password policy overrides

This commit is contained in:
thePR0M3TH3AN
2025-07-30 19:57:38 -04:00
parent f664c4099c
commit b4d60782af
4 changed files with 183 additions and 6 deletions

View File

@@ -265,7 +265,11 @@ class EntryService:
def generate_password(self, length: int, index: int) -> str:
with self._lock:
return self._manager.password_generator.generate_password(length, index)
entry = self._manager.entry_manager.retrieve_entry(index)
gen_fn = getattr(self._manager, "_generate_password_for_entry", None)
if gen_fn is None:
return self._manager.password_generator.generate_password(length, index)
return gen_fn(entry, index, length)
def get_totp_code(self, entry_id: int) -> str:
with self._lock: