Aller au contenu
login
arrow_backRetour aux issues
fu351/Doberman-Core #439

doctor: add a "Password" row next to the 2FA row

ecoDébutant enhancement good first issue level-3

descriptionDescription

`doberman doctor` reports whether TOTP is enrolled (`_check_2fa`, `src/doberman/cli/doctor.py:213-220`) but says nothing about the local password factor, even though `doberman status` already shows `Password: enrolled/not set` (`src/doberman/cli/main.py:742`) and `doberman.auth.password.is_enrolled()` exists (`src/doberman/auth/password.py:82`). A fresh install that skipped `doberman password set` passes `doctor` with no hint. **What to do** 1. Add `_check_password()` mirroring `_check_2fa` line for line: import `password` from `doberman.auth`, `OK "set"` when `password.is_enrolled()`, else `WARN "not set (optional) - run doberman password set"`. 2. Register it in `run_checks()` (`:252-262`) right after the 2FA row, non-critical (`False`), same as 2FA. 3. Extend `tests/unit/test_cli_doctor.py` and `tests/unit/test_cli_doctor_json.py`: a `Password` row appears with the expected status (monkeypatch `is_enrolled` both ways). Read-only: `is_enrolled()` checks presence, never the secret.
codeOuvre sur GitHub