Sloth-ninja gives JessicaOSS a firm-wide work library

Owners can now share selected matters and standalone reviews with colleagues across their organisation, with tighter controls than a broad share link.

workflowsecurity

The first half of a firm library is now in place. An owner can make a matter or standalone review visible to everyone in their organisation; the interface for doing it is still to come.

  • Same-organisation access: colleagues can open firm-shared work, while people outside the organisation cannot.
  • Owner control: only the owner can share a resource firm-wide, and colleagues remain viewers.
  • Admin reversal: administrators can withdraw firm visibility within their own organisation after a second authentication check.
  • Audit trail: sharing and reversals are recorded where possible.

Existing individual email sharing continues to work, and matter-linked reviews follow the matter's permission decision.

So what Legal-ops teams and firms building shared review practices should care: this creates a controlled route from personal work product to an internal knowledge resource.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

1 commit from Sloth-ninja/JessicaOSS, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
2cc393d1 WS9 PR 2: firm-visibility backend (access branches, visibility routes, firm library) sloth-ninja 2026-07-28 ↗ GitHub
commit body
Enforce and expose the firm library on top of migration 20260728_02:

- lib/access.ts: firm branch added to checkProjectAccess, ensureReviewAccess,
  ensureDocAccess, listAccessibleProjectIds, filterAccessibleDocumentIds - an
  item is accessible when visibility='firm' AND organisation_id = the caller's
  org (resolved once via getUserOrganisationId, threadable, 42703-tolerant).
  Firm viewers are non-owners; project-scoped reviews inherit their matter's
  visibility; missing columns => firm branch silently absent (legacy fallback).
- projects/tabular overview RPC calls pass p_user_org_id; GET /projects/:id and
  /people route access through checkProjectAccess so firm viewers reach matters.
- lib/firmVisibility.ts (self-contained seam): owner flip (predicate-encoded,
  owner-only), admin revert (org-scoped cross-org exclusion), firm-library list
  (reuses the overview RPCs filtered to visibility='firm').
- Routes: PATCH /projects/:id/visibility, PATCH /tabular-review/:id/visibility
  (owner-only, orgless 403, project-scoped review rejected 400), admin
  GET /admin/firm-library + POST /admin/firm-library/:type/:id/revert (MFA),
  member GET /firm-library, GET /user/firm-members (displayName+email only).
  All flips best-effort audited firm_shared/firm_reverted.

Tests: 500 passed (442 baseline + 58 new: access matrix, firmVisibility predicate
atomicity + cross-org, and the four route suites). tsc clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-1132.md from inside the repo you want the changes in.

⬇ Download capture-thread-1132.md