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

akvo / akvo-mis
89%
main: 89%

Build:
Build:
LAST BUILD BRANCH: feature/273-two-phase-registration
DEFAULT BRANCH: main
Repo Added 20 Jun 2025 09:17AM UTC
Files 113
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

LAST BUILD ON BRANCH feature/273-two-phase-registration
branch: SELECT
CHANGE BRANCH
x
  • No branch selected
  • HEAD
  • develop
  • epic/multi-tenant-saas
  • feature/100-do-not-refresh-the-map-layer
  • feature/105-check-questionnaires-with-akvoflow
  • feature/112-documentation-update-read-the-docs
  • feature/122-07112025_FieldTestNotes
  • feature/122-eps-construction
  • feature/122-fiji-questionnaire-digitization
  • feature/122-rural-project-form-271025
  • feature/122-update-eps
  • feature/122-wtp-wwtp-01102025
  • feature/122-wtp-wwtp-sps
  • feature/126-admin-export-registration-and-monitoring-data
  • feature/131-supports-the-minimum-of-the-selected-administration-level
  • feature/134-questionnaire-final-adjustment-and-app-update
  • feature/142-akvo-flow-form-and-data-download
  • feature/144-akvo-flow-administration-mapping
  • feature/146-akvo-flow-form-and-questions-mapping
  • feature/148-akvo-flow-data-seeding
  • feature/151-add-akvo-flow-datapoint-id-to-datapoint-name
  • feature/153-toggle-show-all-questions-in-datadetail
  • feature/155-akvo-flow-show-photo-on-report
  • feature/158-update-wwtp
  • feature/160-add-monitoring-count-column-to-the-list-of-registration
  • feature/162-fix-all-options-color-in-all-forms
  • feature/164-add-documentation-link-in-sidebar
  • feature/199-feedback-1
  • feature/199-visualization-dws-config
  • feature/203-correct-map-view-legend-color-coding-across-forms
  • feature/203-fix-manage-data-map-view-performance-issues
  • feature/207-mobile-app-fix-sync-and-add-autoupdate
  • feature/209-visualization-adjust-legend-of-map-based-on-filter
  • feature/214-issues-with-data-migrated
  • feature/216-approval-workflow-issues
  • feature/218-add-photo-galleries-to-landing-page-change-address
  • feature/220-improve-expo-sqlite-in-mobile-and-fix-sentry-issues
  • feature/224-superadmin-can-see-all-submissions
  • feature/229-fb-002-implement-backend-form-crud-api
  • feature/234-fb-004-create-form-list-management-ui
  • feature/236-fb-007-implement-form-importexport
  • feature/238-fb-009-update-permission-system
  • feature/241-remove-windowforms
  • feature/244-re-enable-bulk-upload-button-in-manage-data-page
  • feature/255-submitted-forms-persist-in-local-database
  • feature/260-selective-monitoring-form-assignment
  • feature/262-allow-empty-draft-sync
  • feature/265-migrate-seeder-forms
  • feature/268-free-tier-registration
  • feature/269-tenant-scoping-db
  • feature/270-tenant-isolation-read-filtering
  • feature/271-tenant-write-path
  • feature/273-two-phase-registration
  • feature/68-visualization-api
  • feature/70-eng-1233-add-attachment-to-batches
  • feature/74-eng-1560-bug-fixing-mobile-n-submissions
  • feature/75-eng-1330-submission-submission-draft-sync
  • feature/80-eng-1337-admin-report-generation
  • feature/85-batch-submission-line-chart-in-approval-showing-temporal-data
  • feature/87-eng-1335-manage-data-maps
  • feature/89-test-seeder-complete-seeder
  • feature/92-rename-monitoring-data-stats
  • feature/94-forms-merge-eps-forms
  • feature/95-maps-api-to-display-form-data-values-on-maps
  • feature/99-rbac-for-users-management
  • main
  • origin/feature/134-dependency-rule
  • tenant/mohhs-mis
  • tenant/unicef-fsm

31 Jul 2026 09:36AM UTC coverage: 88.879%. First build
#778

Pull #285

coveralls-python

zuhdil
[#273] Scope approval batches, and make role names unique per tenant

Two gaps the read-isolation iteration left behind, found while checking
the role endpoint.

**Batches were readable across workspaces by guessing an id.** Five
endpoints — the batch's data, its comments, its summary, its attachments
— each fetched `DataBatch` by the id in the URL without asking whose it
was. Those ids are sequential, so any authenticated submitter or approver
in any workspace could walk another's pending submissions. Queryset-level
filtering could never have caught this: the lookup does not go through a
list.

`DataBatch` now carries the tenant path the read-isolation spec already
assigned it but which was never implemented, and one `batch_for` helper
asks the ownership question so a sixth endpoint cannot forget to.

**Role names were globally unique**, so the second workspace to want a
"Data Entry" role could not have one — an integrity error with no
sensible message. Uniqueness is now per tenant.

That needs the tenant stored on the role rather than derived through its
level, because a unique constraint cannot span a join. The column is
denormalised, so `save` sets it from `administration_level.tenant` and
nothing else can: it is not an input. `TENANT_PATH` follows it to the
direct column. The migration backfills from each role's level before the
constraint is added — leaving the column NULL would make every existing
role look like it belonged to one tenant-less workspace, and two legacy
roles sharing a name would collide.

The isolation tests pair each refusal with the same request against the
caller's own batch, because a route that does not exist also answers 404.

Still unaddressed, and deliberately: `RoleAccess`, `RoleFeatureAccess`
and `QuestionOptions` were also given paths by that spec and still lack
them. Each is only reachable through a parent that is scoped, so none is
currently exposed.
Pull Request #285: [#273] Verify the email before the workspace exists

5772 of 6671 branches covered (86.52%)

Branch coverage included in aggregate %.

10996 of 12195 relevant lines covered (90.17%)

0.9 hits per line

Relevant lines Covered
Build:
Build:
12195 RELEVANT LINES 10996 COVERED LINES
0.9 HITS PER LINE
Source Files on main
  • Tree
  • List 113
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
#778 feature/273-two-phase-registration [#273] Scope approval batches, and make role names unique per tenant Two gaps the read-isolation iteration left behind, found while checking the role endpoint. **Batches were readable across workspaces by guessing an id.** Five endpoints — the b... Pull #285 31 Jul 2026 09:45AM UTC zuhdil coveralls-python
88.88
#777 HEAD Merge 1b9ff6a46 into b9905c879 push 31 Jul 2026 09:44AM UTC web-flow coveralls-python
88.88
#776 feature/273-two-phase-registration [#273] Scope approval batches, and let two tenants share a role name Two gaps the read-isolation iteration left behind, found while checking the role endpoint. **Batches were readable across workspaces by guessing an id.** Five endpoints — the b... Pull #285 31 Jul 2026 09:21AM UTC zuhdil coveralls-python
88.88
#775 HEAD Merge 691caacd2 into b9905c879 push 31 Jul 2026 09:20AM UTC web-flow coveralls-python
88.87
#774 HEAD Merge ef7087147 into ca88641e4 push 30 Jul 2026 07:14AM UTC web-flow coveralls-python
88.79
#773 epic/multi-tenant-saas [#271] Enforce tenant ownership on every write (#282) * [#271] Add the tenant stamping mixin and scoped related field Two write-side mechanisms mirroring the read-side for_user. The stamping mixin sets a new row's tenant from the authenticated u... Pull #280 30 Jul 2026 07:14AM UTC web-flow coveralls-python
88.79
#772 feature/271-tenant-write-path [#271] Trim the write-enforcement diff Complexity-only pass; no behaviour change. - acting_user picked the first non-None of two context keys across six lines. A user object is always truthy, so `or` says the same thing in one expression. -... Pull #282 29 Jul 2026 07:31AM UTC zuhdil coveralls-python
88.79
#771 HEAD Merge 3ff7ea08b into ca88641e4 push 29 Jul 2026 07:04AM UTC web-flow coveralls-python
88.74
#770 epic/multi-tenant-saas [#270] Filter every read by tenant (#281) * [#270] Add the for_user tenant-scoping mechanism Each tenant-owned model declares TENANT_PATH — the ORM lookup to its owning tenant, "tenant" for direct-FK tables and a join like "form__tenant" for der... Pull #280 29 Jul 2026 07:04AM UTC web-flow coveralls-python
88.74
#769 HEAD Merge 217092319 into 44d171b4c push 29 Jul 2026 06:48AM UTC web-flow coveralls-python
88.8
See All Builds (777)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc