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

GEWIS / sudosos-backend / 27945855236
92%

Build:
DEFAULT BRANCH: develop
Ran 22 Jun 2026 10:25AM UTC
Jobs 1
Files 281
Run time 1min
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

22 Jun 2026 10:20AM UTC coverage: 92.033% (+0.01%) from 92.02%
27945855236

push

github

web-flow
feat: ToS version acceptance tracking (#963)

* feat: add TermsOfServiceAcceptance entity and migration

Adds a table recording which TOS version each user accepted and when,
plus a user.tosRequired flag replacing the stored acceptedToS enum.
The migration backfills tosRequired and inserts version 1.0 acceptance
rows for users that had accepted the legacy single-version TOS.

* feat: add derived TOS status logic to TermsOfServiceService

getCurrentVersion (cached highest version), getUserTosStatus,
haveUsersAcceptedCurrent (bulk variant for transaction checks),
and getAcceptances for the audit endpoint.

* feat!: derive TOS status from acceptance records

- user.tosRequired replaces the stored acceptedToS enum; the status is
  computed against the current TOS version
- POST /users/acceptTos requires the version being accepted and rejects
  non-current or already-accepted versions with a 400
- JWT carries a computed top-level acceptedToS field; the restriction
  middleware falls back to the legacy embedded field for old tokens
- UserResponse.acceptedToS is replaced by tosRequired (breaking);
  AuthenticationResponse.acceptedToS is unchanged but now computed
- transaction verification and the userMustExist validator check
  acceptance of the current version

* feat: add GET /users/{id}/tos audit endpoint

Returns the computed TOS status, the current TOS version, and the
full acceptance history of a user.

* test: update seeders and user factory for TOS acceptance records

Seeded users get tosRequired plus an acceptance record of the current
TOS version so they keep transacting in tests.

* test: adapt tests to derived TOS status

- tosRequired replaces acceptedToS in fixtures; token-level acceptedToS
  in restriction middleware tests
- new tests for getCurrentVersion, getUserTosStatus,
  haveUsersAcceptedCurrent, getAcceptances, GET /users/{id}/tos, and
  the versioned accept flow (wrong version, duplicate, re-accept)

* test: fix invoice and base-contr... (continued)

4235 of 4841 branches covered (87.48%)

Branch coverage included in aggregate %.

165 of 177 new or added lines in 20 files covered. (93.22%)

21837 of 23488 relevant lines covered (92.97%)

841.59 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
85.3
0.26% src/controller/user-controller.ts
3
96.95
-0.69% src/service/user-service.ts
2
82.28
-2.86% src/controller/request/validators/general-validators.ts
1
75.89
0.0% src/helpers/revision-to-response.ts
Jobs
ID Job ID Ran Files Coverage
1 27945855236.1 22 Jun 2026 10:25AM UTC 281
92.03
GitHub Action Run
Source Files on build 27945855236
  • Tree
  • List 281
  • Changed 21
  • Source Changed 20
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #27945855236
  • 121f5df8 on github
  • Prev Build on develop (#27833085208)
  • Next Build on develop (#27955332551)
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