Closed MythicManiac closed 7 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
37cca3a
) 92.82% compared to head (ae1f55d
) 92.87%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR introduces the concept of visibility flags which can be attached to objects and provides a standard interface for querying objects with visibility rules in mind.
The visibility-aware query methods are intentionally kept stupid simple, as the assumption is that the visibility flags will later on be tied to a mechanism which updates them when the underlying object state changes. In other words, the flags which are queried against serve as a sort of cache, while the actual complexities of the visibility rules have to be implemented elsewhere. Ultimately this lets us use far simpler and easier to maintain queries compared to representing all visibility rules on each query site directly.
Some open questions which I deemed out of scope for this PR:
Package
model object and want to query it's versions field with some specific visibility constraint, does that work out of the box via the related manager?TODO (This PR):