Files
outline/server
Tom MoorandClaude Opus 4.6 45f78d3398 Refactor isPrivate restrict/unrestrict logic into Document model
Move cascading and validation logic out of the API route into the
Document model for safety, ensuring invariants are enforced regardless
of how isPrivate is changed.

- Add @BeforeUpdate hook to prevent unrestricting a child of a
  restricted parent
- Add cascadeRestrict() and cascadeUnrestrict() instance methods
  for descendant propagation and membership cleanup/rebuild
- Slim down API route to only handle authorization and acting-user
  admin membership
- Update documentMover to use cascadeRestrict(), fixing a gap where
  sourced memberships weren't destroyed on auto-restrict during move

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 10:19:12 -04:00
..
2026-03-20 09:45:50 -04:00
2026-01-31 20:56:36 -05:00