feat(learner): support assigned interactive books
Author: evan188199-techCreated Sep 29, 2026Updated Sep 29, 2026
Summary
Learning accounts currently support chat and reading surfaces only. Add an explicitly grantable books surface so a learner can open administrator-assigned interactive books.
Proposed behavior
- Keep the default learner policy at
chat + reading; do not expose books implicitly. - Allow administrators/guardians to add
booksexplicitly to the learning policy. - Expose only books allowed by the existing shared-book ACL.
- Use the shared-book read ACL as the learner-facing boundary: assigned books are readable, and read access must not allow editing or deleting the canonical book.
- Preserve per-learner reading progress, captures, quiz attempts, and page-chat session state.
Security requirements
- A learner without
booksremains denied on book APIs and dashboard book aggregation. - A learner with
booksbut no shared-book ACL sees no shared book. - A learner with read-only ACL cannot mutate the shared canonical book.
- No implicit
booksgrant is introduced for existing learner accounts.
Acceptance tests
- Surface mapping allows
/api/booksand the books learning-library aggregation only when the policy grantsbooks. - Default learner policy remains
["chat", "reading"]. - Assigned shared books list with
source=shared,permission=read,can_edit=false, andcan_delete=false. - Unassigned shared books are absent.
- Read-only shared-book mutations remain denied.
Source: HKUDS/DeepTutor