history.visibility
Overview
Which history events a requester may read.
The rule has two halves. Events on the requested object are visible, because the endpoint has already authorized that object. Events on a related row follow that row: visible while the requester can read it, and after deletion only when the model's visibility never depended on the row in the first place.
Every part of the rule is a query predicate, so the filter runs before pagination and a hidden event leaves no trace in a page count.
related_tracked_models
Every tracked model whose events can reference model, excluding the model itself.
The schema decides this list, so the number of subqueries the predicate builds depends on the shape of the models rather than on how much history exists.
Signature
related_tracked_models(model)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| model | yes |
Source
server/vueda/history/visibility.py:42
visibility_predicate
A predicate over the aggregate event columns for one requested object and one requester.
Signature
visibility_predicate(instance, user)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| instance | yes | ||
| user | yes |
Source
server/vueda/history/visibility.py:56
Source
server/vueda/history/visibility.py