fix(api/admin): dedicated users-scope toggle, data-scope UI, and API-tokens navigation#55
Open
rawand-shakir-draad wants to merge 6 commits into
Open
Conversation
The back button in the project sidenav was accidentally changed to a javascript: URI Link during an unrelated data-scope refactor, which breaks under a strict CSP and drops normal link semantics.
…rting /reports/users/anonymized and /reports/users/aggregates were gated by "any reporting component enabled", so turning on just one component (e.g. votes) silently exposed the full pseudonymized participant roster and cross-source aggregates project-wide. They now require their own dataScope.users.enabled opt-in.
…-ins Two gaps in the data-scope settings page: - No admin toggle existed for the new dataScope.users.enabled gate (anonymized/aggregate user reporting). - dataScope.submissions.formFields and dataScope.choiceguides.answerFields had no UI at all, so that per-field opt-in could never be turned on. Adds a "Deelnemers (geanonimiseerd)" toggle, plus a dynamic checkbox list per project sourced from its enquete/choiceguide widgets' own form fields.
The link to the per-project API-tokens overview page was accidentally dropped during the data-scope refactor (46a4fa3), leaving the page reachable only via a direct URL. Restore it and move it under Projectinstellingen, next to Data via API, since both pages share the same settings-route structure and access gating.
rawand-shakir-draad
force-pushed
the
feature/reporting-foundation
branch
from
July 8, 2026 08:23
4584141 to
64ad01a
Compare
rawand-shakir-draad
force-pushed
the
feature/reporting-endpoints
branch
from
July 8, 2026 08:23
bfce592 to
0285f56
Compare
Was never wired into docker-compose.yml, so pseudonymizing reporting endpoints always 500'd locally. Follows the same pattern as HASH_IP_SALT.
… catalog report-data-scope.js claimed status (resources/comments) and modBreak/ modBreakDatetime (comments) as safe fields, but neither model has these attributes — always null, never filterable. Removed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Closes out the remaining admin/security polish on top of the reporting endpoints (submissions, choice guides, anonymized users — now part of
feature/reporting-foundation):fix(api)):/reports/users/anonymizedand/reports/users/aggregateswere gated by "any reporting component enabled", so turning on just one component (e.g. votes) silently exposed the full pseudonymized participant roster and cross-source aggregates project-wide. They now require their owndataScope.users.enabledopt-in.feat(admin)): adds the missing "Deelnemers (geanonimiseerd)" toggle for the gate above, plus a dynamic checkbox list per project for thesubmissions.formFields/choiceguides.answerFieldsper-field opt-ins (previously only settable via the config API, no UI at all).fix(admin)): restores the API-tokens link in the project settings sidenav (the page existed and worked, but was unreachable from the UI — direct-URL only) and nests it correctly under project settings.fix(admin)): restores the resource detail back-navigation as a real<button>element.Tests
NODE_CONFIG_DIR="$(pwd)/apps/api-server/config" npm run test:unit:api→ all API unit tests passing (275 tests, 24 files).Notes
feature/reporting-foundation, notmain— this stacks on the reporting foundation, which now includes the submissions, choice-guide and anonymized-user endpoints too.