BccCode.Privacy.ChangeHistory
12.0.0
See the version list below for details.
dotnet add package BccCode.Privacy.ChangeHistory --version 12.0.0
NuGet\Install-Package BccCode.Privacy.ChangeHistory -Version 12.0.0
<PackageReference Include="BccCode.Privacy.ChangeHistory" Version="12.0.0" />
<PackageVersion Include="BccCode.Privacy.ChangeHistory" Version="12.0.0" />
<PackageReference Include="BccCode.Privacy.ChangeHistory" />
paket add BccCode.Privacy.ChangeHistory --version 12.0.0
#r "nuget: BccCode.Privacy.ChangeHistory, 12.0.0"
#:package BccCode.Privacy.ChangeHistory@12.0.0
#addin nuget:?package=BccCode.Privacy.ChangeHistory&version=12.0.0
#tool nuget:?package=BccCode.Privacy.ChangeHistory&version=12.0.0
BccCode.Privacy.ChangeHistory
Connects BccCode.Privacy.EntityFrameworkCore and BccCode.ChangeHistory on one model, so events, links, changes and
history versions are read per org, like the current rows. Hosting's AddPrivacy registers it; without Hosting:
services.AddChangeHistory<AppDbContext>(o => o.UseNpgsql(connectionString)); // or AddDbContext
services.AddPrivacyEntityFrameworkCore<AppDbContext>(models);
services.AddPrivacyChangeHistory();
AddPrivacyChangeHistory():
- registers ChangeHistory's reader scope,
PrivacyEventReaderScope: the orgs of the scope'sPrivacyContext. A reader sees an event, its payload and trace only when all its links belong to those orgs (FilterEventsByOrganisation()); an event that spans orgs, or has a link without an owner, is read only withIgnoreQueryFilters()(maintenance). No orgs: no events; - turns on
FilterHistoryByCurrentRow(): history versions are read only while the current row passes the privacy filter; - makes each personal entity's org its events' owner (
HasEventOwner); a child entity's events belong to its parent's org, through the navigation to the parent; - keeps the privacy columns (
allowed_processes,person_link,last_reduced_at) out of versioning, so the derivation and the privacy job's reductions write no history version, and gives the privacy job a row writer that rewrites history too.
Hosting checks at start-up that a ChangeHistory context reads events through PrivacyEventReaderScope.
In a mixed or ownerless event, Changes() and ChangesFor() keep the change to the reader's own row, with the
event's name, actor and reason left empty.
Deleted rows
By default the history of a deleted row is hidden, as the row is. IncludeDeleted() opts one read in, for retract,
undo and the audit of deletions:
var versions = await db.History.IncludeDeleted().Versions<Member>().Where(v => v.Entity.Id == id).ToListAsync();
await using var past = await db.History.IncludeDeleted().AsOfAsync(before);
A deleted row is shown only when the privacy filter passes on its last version: the row was one of the context's orgs',
and its allowed_processes held the context's process when it was deleted. Another organisation never sees it, and
IgnoreQueryFilters() is not needed (it would drop both checks).
Versions tested
BccCode.ChangeHistory 0.6.80 from nuget.org, the version Directory.Packages.props pins (0.6.80 adds HasEventOwner
through a parent navigation). Versions 0.4.43 to 0.4.63 are partial releases; do not use them.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- BccCode.ChangeHistory (>= 0.6.90)
- BccCode.Core.Api.Client (>= 1.0.27)
- BccCode.Linq (>= 2.0.1.43)
- BccCode.Platform.Apis (>= 2.0.1.40)
- BccCode.Platform.Config (>= 2.0.1.40)
- BccCode.Privacy.Client (>= 1.0.39)
- BccCode.Privacy.Hosting (>= 12.0.0)
- BccCode.Privacy.Vocabulary (>= 1.0.39)
- BccCode.PubSub.Client (>= 1.0.55)
- Microsoft.AspNetCore.Authentication.OpenIdConnect (>= 10.0.15)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.15)
- Microsoft.Extensions.Caching.Memory (>= 10.0.15)
- Microsoft.Extensions.Http (>= 10.0.15)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 10.0.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 14.6.8 | 38 | 11/26/2026 |
| 14.6.7 | 41 | 11/26/2026 |
| 14.6.6 | 41 | 11/26/2026 |
| 14.6.5 | 44 | 11/26/2026 |
| 14.6.4 | 43 | 11/26/2026 |
| 14.6.3 | 46 | 11/26/2026 |
| 14.6.2 | 40 | 11/26/2026 |
| 14.6.1 | 47 | 11/26/2026 |
| 14.6.0 | 41 | 11/26/2026 |
| 14.5.0 | 37 | 11/26/2026 |
| 14.4.0 | 45 | 11/26/2026 |
| 14.3.0 | 38 | 11/26/2026 |
| 14.2.0 | 40 | 11/26/2026 |
| 14.1.1 | 44 | 11/26/2026 |
| 14.1.0 | 39 | 11/26/2026 |
| 14.0.1 | 34 | 11/26/2026 |
| 14.0.0 | 42 | 11/26/2026 |
| 13.0.0 | 39 | 11/26/2026 |
| 12.0.1 | 38 | 11/26/2026 |
| 12.0.0 | 46 | 11/26/2026 |