• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kobotoolbox / kpi / 24240621179
82%
master: 76%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 10 Apr 2026 11:29AM UTC
Jobs 10
Files 910
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

10 Apr 2026 11:25AM UTC coverage: 82.201% (+0.002%) from 82.199%
24240621179

push

github

web-flow
fix(mfa): enable safe MFA deactivation via Admin UI during all-auth transition DEV-1835 (#6925)

### 📣 Summary
This PR replaces the legacy Trench admin UI with the new all-auth
`MfaMethodsWrapper` admin and ensures that deleting a user's wrapper
correctly cascades to delete all underlying `Authenticator` and legacy
Trench `MfaMethod` records, preventing user lockouts.


### 📖 Description
During the transition from Trench to Django all-auth, deleting a user's
MFA method via the legacy Trench Admin UI were inadvertently leaving
behind orphaned all-auth `Authenticator` and `MfaMethodsWrapper`
records. This caused a desynchronization where
`UserProfile.is_mfa_active` would be False, but the orphaned all-auth
wrapper would still force the user into an MFA challenge, effectively
locking them out.

This PR:
- Replaces the legacy Trench admin interface with the all-auth based
`MfaMethodsWrapper` admin and ensures that deleting a wrapper properly
cascades to remove all associated records.
- The .delete() method on `MfaMethodsWrapper` has been overridden to
delete related `Authenticator` entries as well as the legacy Trench
`MfaMethod`.
- Additionally, `delete_queryset` has been overridden in the admin to
ensure bulk deletion actions trigger the same custom logic instead of
bypassing it via raw SQL.

7775 of 11960 branches covered (65.01%)

20 of 35 new or added lines in 3 files covered. (57.14%)

433 existing lines in 20 files now uncovered.

29604 of 36014 relevant lines covered (82.2%)

5.79 hits per line

Uncovered Changes

Lines Coverage ∆ File
10
52.87
-4.82% kobo/apps/accounts/mfa/models.py
3
82.35
-17.65% kobo/apps/accounts/mfa/admin.py
2
83.33
-16.67% kobo/apps/accounts/mfa/apps.py

Coverage Regressions

Lines Coverage ∆ File
81
0.0
-93.1% kobo/apps/stripe/serializers.py
75
0.0
-41.9% kobo/apps/stripe/views.py
63
0.0
-51.64% kobo/apps/stripe/models.py
60
26.05
-50.42% kobo/apps/stripe/utils/subscription_limits.py
36
20.21
-38.3% kobo/apps/stripe/utils/billing_dates.py
24
74.76
-23.3% kpi/utils/usage_calculator.py
19
0.0
-65.52% kobo/apps/stripe/admin.py
14
31.82
-31.82% kobo/apps/stripe/utils/limit_enforcement.py
12
35.0
-60.0% kobo/apps/stripe/utils/import_management.py
11
0.0
-44.0% kobo/apps/stripe/signals.py
8
0.0
-100.0% kobo/apps/stripe/urls.py
7
0.0
-100.0% kobo/apps/stripe/apps.py
6
0.0
-37.5% kobo/apps/stripe/utils/view_utils.py
6
63.08
-1.54% kpi/utils/hash.py
3
61.21
-1.82% kobo/apps/organizations/models.py
3
60.53
-7.89% kobo/apps/organizations/utils.py
2
44.65
-0.38% kobo/apps/openrosa/libs/utils/logger_tools.py
1
40.85
-1.41% kobo/apps/organizations/admin/organization.py
1
92.31
-7.69% kobo/apps/user_reports/utils/migrations.py
1
85.0
-5.0% kpi/urls/__init__.py
Jobs
ID Job ID Ran Files Coverage
1 24240621179.1 10 Apr 2026 11:29AM UTC 906
52.79
2 24240621179.2 10 Apr 2026 11:30AM UTC 906
54.33
3 24240621179.3 10 Apr 2026 11:31AM UTC 908
54.01
4 24240621179.4 10 Apr 2026 11:31AM UTC 906
53.02
5 24240621179.5 10 Apr 2026 11:32AM UTC 906
60.37
6 24240621179.6 10 Apr 2026 11:32AM UTC 908
55.57
7 24240621179.7 10 Apr 2026 11:33AM UTC 908
54.37
8 24240621179.8 10 Apr 2026 11:33AM UTC 908
61.5
9 24240621179.9 10 Apr 2026 11:34AM UTC 910
68.28
10 24240621179.10 10 Apr 2026 11:57AM UTC 908
66.03
Source Files on build 24240621179
  • Tree
  • List 910
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • be427f77 on github
  • Prev Build on release/2.026.12 (#24132370002)
  • Next Build on release/2.026.12 (#24248214994)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc