You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Split off from #230. A player can only edit a wiki page they authored; a group-visible page the GM created is read-only to players even though everyone can see it.
defcan_edit_page(page, campaign, user):
"""Owner edits anything; a member may edit a page they authored."""ifcampaign.owner_id==user.id:
returnTruereturnpage.created_by_id==user.id
So a shared "party knowledge base" page started by the GM can't be contributed to by players — they can read it but not add to it.
Requested
Allow players to edit GM-authored group-visible pages so the wiki can be a collaborative knowledge base (as described in #230).
Notes / open questions
Scope which pages become player-editable: probably group visibility only. members-shared and gm pages should stay owner-controlled (or editable only by shared members — to be decided).
Interacts with GM secrets (GM secret deleted on shared notes #230): a player editing a GM-authored page will hit the same masked-secret flow. The merge_gm_secrets / ⟦GM·N⟧ marker mechanism added in GM secret deleted on shared notes #230 already covers preserving secrets on such edits — verify it holds for GM-authored pages too.
Consider an opt-in ("allow players to edit") vs. always-on for group pages.
Update can_edit_page, the can_edit flags returned by the list/detail endpoints, and PageEditor gating. Docs: docs/api.md and the campaigns guide.
Summary
Split off from #230. A player can only edit a wiki page they authored; a group-visible page the GM created is read-only to players even though everyone can see it.
Backend,
can_edit_page:So a shared "party knowledge base" page started by the GM can't be contributed to by players — they can read it but not add to it.
Requested
Allow players to edit GM-authored group-visible pages so the wiki can be a collaborative knowledge base (as described in #230).
Notes / open questions
members-shared andgmpages should stay owner-controlled (or editable only by shared members — to be decided).merge_gm_secrets/⟦GM·N⟧marker mechanism added in GM secret deleted on shared notes #230 already covers preserving secrets on such edits — verify it holds for GM-authored pages too.can_edit_page, thecan_editflags returned by the list/detail endpoints, andPageEditorgating. Docs:docs/api.mdand the campaigns guide.Follow-up to #230.