towerops/lib/towerops/accounts
Graham McIntire a680d5ea94 refactor: split accounts.ex into cohesive submodules
Continues the extraction begun with Accounts.TOTP and Accounts.Sessions.
The context module shrinks from ~1198 to 577 lines by moving cohesive
sub-domains into dedicated submodules under lib/towerops/accounts/:

  * Consents          - grant/revoke/list user consents (+ private
                        grant_consents_sequential helper used by
                        register_user/1)
  * PolicyVersions    - policy version CRUD + reconsent detection
  * LoginHistory      - record/list/count login attempts, GDPR anonymize
  * MagicLinks        - magic-link login flow
  * Passwords         - change/update/reset + reset-instruction email
  * Emails            - change/update + update-instruction email

The Accounts module retains a defdelegate facade so existing callers
across lib/towerops_web and other contexts continue to work unchanged.

Two shared transaction helpers (update_user_and_delete_all_tokens/1 and
unwrap_transaction_result/1) are used by multiple extracted modules; they
remain in Accounts but are now public with @doc false rather than
duplicated.
2026-04-30 14:26:30 -05:00
..
browser_session.ex add 100% test coverage for Towerops.Accounts 2026-03-11 10:37:03 -05:00
consents.ex refactor: split accounts.ex into cohesive submodules 2026-04-30 14:26:30 -05:00
emails.ex refactor: split accounts.ex into cohesive submodules 2026-04-30 14:26:30 -05:00
hibp.ex tests: raise coverage to 70% via helper promotion + new unit/property tests 2026-04-24 09:49:06 -05:00
login_attempt.ex purge more passkey and gettext updates 2026-02-02 10:20:59 -06:00
login_history.ex refactor: split accounts.ex into cohesive submodules 2026-04-30 14:26:30 -05:00
magic_links.ex refactor: split accounts.ex into cohesive submodules 2026-04-30 14:26:30 -05:00
passwords.ex refactor: split accounts.ex into cohesive submodules 2026-04-30 14:26:30 -05:00
policy_version.ex gdpr consent tracking 2026-01-29 11:12:35 -06:00
policy_versions.ex refactor: split accounts.ex into cohesive submodules 2026-04-30 14:26:30 -05:00
scope.ex feat: add 12/24-hour time format setting with consistent timezone display 2026-02-13 15:16:29 -06:00
sessions.ex refactor: address audit recommendations from results.md 2026-04-30 12:33:41 -05:00
totp.ex refactor: address audit recommendations from results.md 2026-04-30 12:33:41 -05:00
user.ex dialyzer: fix remaining 88 warnings — clean dialyzer run 2026-04-21 10:32:42 -05:00
user_agent_parser.ex refactor: convert 6 Gleam modules to idiomatic Elixir with TDD (#196) 2026-03-28 09:52:07 -05:00
user_consent.ex more tests 2026-02-03 12:03:54 -06:00
user_notifier.ex gdpr (#86) 2026-03-19 14:28:31 -05:00
user_recovery_code.ex fix: comprehensive security audit fixes (#108) 2026-03-22 10:10:27 -05:00
user_token.ex feat: require email verification before first login 2026-02-14 11:28:57 -06:00
user_totp_device.ex fix TOTP enrollment with recovery codes 2026-01-31 14:54:44 -06:00