Phase 2 of the public-viewing feature. can_view_tree() now branches on the viewer's auth state so the four-level model is enforceable:
public / unlisted → anyone incl. anonymous (unlisted not listed by the API)
site_members → any authenticated account (denies anonymous)
private → members only
Members always view; soft-deleted trees stay hidden. person_visibility (living-person redaction) unchanged.
Tests (ran locally, all green — CI does not run pytest): full can_view_tree matrix over {anonymous, logged-in non-member, member} × {public, unlisted, site_members, private}, deleted-tree-hidden, and the site_members anon-vs-logged-in case. Adds engine/db_session fixtures (refactored from client) to unit-test the engine directly, including the anonymous path that has no endpoint until phase 3. Full suite: 65 passed.
Phase 2 of the public-viewing feature. `can_view_tree()` now branches on the viewer's auth state so the four-level model is enforceable:
- public / unlisted → anyone incl. anonymous (unlisted not *listed* by the API)
- site_members → any authenticated account (denies anonymous)
- private → members only
Members always view; soft-deleted trees stay hidden. `person_visibility` (living-person redaction) unchanged.
**Tests (ran locally, all green — CI does not run pytest):** full `can_view_tree` matrix over {anonymous, logged-in non-member, member} × {public, unlisted, site_members, private}, deleted-tree-hidden, and the site_members anon-vs-logged-in case. Adds `engine`/`db_session` fixtures (refactored from `client`) to unit-test the engine directly, including the anonymous path that has no endpoint until phase 3. Full suite: 65 passed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
can_view_tree() now distinguishes anonymous vs authenticated non-members so the
four-level model is enforceable:
- public / unlisted → anyone, including anonymous (unlisted gated only by the
link, so the API must never *list* it)
- site_members → any authenticated account (denies anonymous)
- private → members only
Members (any role) always view; soft-deleted trees stay hidden from everyone.
person_visibility (living-person redaction) is unchanged.
Tests: a full can_view_tree matrix across {anonymous, logged-in non-member,
member} × {public, unlisted, site_members, private}, plus deleted-tree-hidden
and the site_members anon-vs-logged-in case. Adds `engine`/`db_session` fixtures
(refactored out of `client`) so the engine can be unit-tested directly,
including the anonymous path that has no HTTP endpoint yet.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Justin Paul <[email protected]>
justin
merged commit 3ff03b037b into main2026-06-09 09:08:18 -04:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Phase 2 of the public-viewing feature.
can_view_tree()now branches on the viewer's auth state so the four-level model is enforceable:Members always view; soft-deleted trees stay hidden.
person_visibility(living-person redaction) unchanged.Tests (ran locally, all green — CI does not run pytest): full
can_view_treematrix over {anonymous, logged-in non-member, member} × {public, unlisted, site_members, private}, deleted-tree-hidden, and the site_members anon-vs-logged-in case. Addsengine/db_sessionfixtures (refactored fromclient) to unit-test the engine directly, including the anonymous path that has no endpoint until phase 3. Full suite: 65 passed.🤖 Generated with Claude Code
can_view_tree() now distinguishes anonymous vs authenticated non-members so the four-level model is enforceable: - public / unlisted → anyone, including anonymous (unlisted gated only by the link, so the API must never *list* it) - site_members → any authenticated account (denies anonymous) - private → members only Members (any role) always view; soft-deleted trees stay hidden from everyone. person_visibility (living-person redaction) is unchanged. Tests: a full can_view_tree matrix across {anonymous, logged-in non-member, member} × {public, unlisted, site_members, private}, plus deleted-tree-hidden and the site_members anon-vs-logged-in case. Adds `engine`/`db_session` fixtures (refactored out of `client`) so the engine can be unit-tested directly, including the anonymous path that has no HTTP endpoint yet. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: Justin Paul <[email protected]>