Skip to content

Players can only create group-visible wiki notes, not private / member-shared / GM-only ones #232

Description

@hunter-read

Summary

Split off from #230. Today a non-owner (player) can only create group-visible wiki pages; the GM owns every other visibility level.

Backend, create_page:

# Members may only create group pages; gm/members visibility is owner-only.
if not is_owner and visibility != "group":
    raise HTTPException(403, "Members can only create group-visible pages")

The same owner-only gate applies on update (update_page) and to the share picker, which the frontend PageEditor hides from non-owners.

Requested

Let players create notes with finer visibility, as raised in #230:

  • Private — visible only to the author (and the GM).
  • Shared with specific players (and the GM) — the existing members visibility, but author-driven rather than owner-only.
  • Shared with only the GM — a player-authored note the GM can read but other players can't.

Notes / open questions

  • The current visibility model is gm / group / members (WikiPageShare rows for members). "Private to author" and "author + GM only" are new concepts — decide whether to add visibility values or reuse members with the author auto-included and the GM always implicitly included.
  • The GM should always be able to read player notes regardless of the chosen visibility (they own the campaign).
  • Update PageEditor.jsx to expose the new options to non-owners, and the share picker accordingly.
  • Docs: docs/api.md (wiki visibility) and the campaigns guide.

Follow-up to #230.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status
    Ready

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions