Repository navigation
Fix/v2 filters and staff access - #1102
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…f access - Fix GetCitizenReportEntries, GetIncidentReportEntries and GetQuickReportEntries (missing MonitoringNgos join, varchar/text mismatches, missing listing columns) in a new migration - Rewrite v2 listings to read from the entry functions with whitelisted ORDER BY clauses; byObserverV2 lists only matching observers when filtered - Remove CitizenReportFilterQuery; inline the citizen by-form query - Add coalitionMemberId v2 filter field for submissions, incidents and quick reports - exported-data:v2 takes `filter` and validates it up front - Fix citizen export hasFlaggedAnswers=true always returning nothing - NGO staff: add ngo_id claim, fix admin-or-staff handler, add citizen reporting admin-or-staff requirement; reads and exports allowed, writes admin-only - Require an active monitoring NGO on remaining NGO list/statistics reads - Restrict monitoring NGO removal, disable citizen reporting and NGO admin/staff activation to platform admins Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Back IReadRepository<T> with a new EfReadRepository<T> that runs every query, projection and GetByIdAsync with AsNoTracking (IReadRepository previously resolved to the same tracking EfRepository) - Move write endpoints that load entities later attached to saved aggregates from IReadRepository to IRepository so they keep tracking - Use IReadRepository in NgoAdmins/Get and NgoStaff/Get - Add AsNoTracking to root EF queries in read endpoints using VoteMonitorContext - Update unit test mocks for the repository changes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Remove EfReadRepository; IReadRepository resolves to EfRepository again - Restore write endpoints and their tests to IReadRepository - Add Query.AsNoTracking() to specifications used only by read endpoints (https://specification.ardalis.com/features/asnotracking.html) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Specifications used by both read and write endpoints keep tracking for the writes; read endpoints now use a *ReadOnlySpecification copy that adds Query.AsNoTracking(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- New Feature.PollingStationCorrections module with AddPollingStationCorrections migration - ListAll and Move endpoints for form submissions, quick reports, incident reports, citizen reports and polling station information - NotObservers authorization policy - PersonalDataMasker helper with tests - Remove orphaned IssueReports unit test projects
idormenco
force-pushed
the
fix/v2-filters-and-staff-access
branch
from
October 12, 2026 13:23
a087c6f to
af3c81b
Compare
| { | ||
| electionRoundId = req.ElectionRoundId, | ||
| recordType = req.RecordType.Value, | ||
| recordId = (Guid?)req.RecordId, |
| electionRoundId = req.ElectionRoundId, | ||
| recordType = req.RecordType.Value, | ||
| recordId = (Guid?)req.RecordId, | ||
| monitoringNgoId = (Guid?)null, |
| recordType = req.RecordType.Value, | ||
| recordId = (Guid?)req.RecordId, | ||
| monitoringNgoId = (Guid?)null, | ||
| searchText = (string?)null, |
| recordId = (Guid?)req.RecordId, | ||
| monitoringNgoId = (Guid?)null, | ||
| searchText = (string?)null, | ||
| pollingStationNumber = (string?)null, |
| monitoringNgoId = (Guid?)null, | ||
| searchText = (string?)null, | ||
| pollingStationNumber = (string?)null, | ||
| correctedOnly = (bool?)null, |
| level1 = (string?)null, | ||
| level2 = (string?)null, | ||
| level3 = (string?)null, | ||
| level4 = (string?)null, |
| level2 = (string?)null, | ||
| level3 = (string?)null, | ||
| level4 = (string?)null, | ||
| level5 = (string?)null |
| { | ||
| electionRoundId = req.ElectionRoundId, | ||
| recordType = req.RecordType?.Value, | ||
| recordId = (Guid?)null, |
|
|
||
| Query | ||
| .Where(x => x.ElectionRoundId == electionRoundId && quickReportIds.Contains(x.QuickReportId)) | ||
| .Where(x=>x.IsDeleted == false) |
|
|
||
| /// <param name="recordTypeExpression">The SQL expression holding the record type, e.g. <c>R."RecordType"</c>.</param> | ||
| /// <param name="recordIdColumn">The SQL expression holding the record id, e.g. <c>R."Id"</c>.</param> | ||
| public static string ForRecord(string recordTypeExpression, string recordIdColumn) => $""" |
This branch had an error being deployed
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.
No description provided.