Moderation: versions of works and the L2 → L1 → admin pipeline #54
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/moderation-pipeline"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #31. Part of #51 (version history; other entities and tags follow). Builds on #53 (Divan-owned content): merge #53 first, or this one, which contains it.
How it works
A moderator who may edit a work (their grants) sees ترمیم کریں and تاریخچہ on it. Edit opens their draft: one open draft per person and work, starting from the current text.
The revision page has:
L2 submits for review. An L1 whose grants cover the work approves it, or returns or rejects it (a reason is required). An admin publishes. L1 drafts go straight to the admin, and an admin's own edits publish directly.
Publishing:
divan/folder as Divan-owned content (author, reviewer and publisher recorded);If another version was published after the draft started, publishing is refused, so nothing is silently overwritten.
/mod: my drafts, drafts to review, drafts to publish, and سرگرمی (who did what across the site). /mod/work/: a work's versions with author, reviewer, publisher, summary and dates.
Data:
revisionsandrevision_eventsindb/schema.sql. Radif, matla, maqta and contents order of an edited work are recomputed by the next daily export and import.Tested
npm test: 35 pass. The pipeline test covers:The test restores the work it edits.
Headless Chrome, three people, against a temporary data folder:
The test edit and accounts were removed afterwards.
Next: git commits on publish (#34), the Tiptap editor (#28), arranging (#41), tags (#52), history for poets, intros, books and the dictionary.
🤖 Generated with Claude Code