Document toolboxDocument toolbox

Wiki Publish Feature

Wikis need a "publish" feature. (PLFM-3581)

Challenge organizers need to collaboratively edit pages shared privately among the admin team. Once content is approved by project leads, it will be published and become visible to the public or to challenge participants.

While the changes are pending, a splash screen or previous version of the wiki should be publicly visible.

Designating a wiki page as a splash screen also might provide a means for private projects to have a public face which could be indexed and searchable. Top-secret projects could still be completely hidden.

Proposed Implementation

Here's a proposal, to be reviewed and critiqued, for how to implement a publish feature.

Synapse already tracks a series of versions for each wiki page. We could also gave page editors the ability to define snapshots - sets of {pageID, version} pairs - and to select which snapshot was "published".

For example, we might start with a splash page published first (snapshot 1). Next we change the contents of the splash page and add two more pages (snapshot 2). Finally, we make some more modifications to pages 1001 and 1002, 1003 remains unchanged, and we add page 1004 (snapshot 3) and publish that.

snapshotIdPageIdVersion
110011
210012
21002

3

210031
310013
310025
310031
310041

Rolling back to a previous snapshot would be easy.

There is a potential gotcha related to optimistic locking. Other users might make changes to pages between the time that the pages are reviewed and vetted for publication and the time that a challenge lead presses the "publish" button.

For this reason, we propose a workflow in which users create a snapshot in one step, then review the pages, then publish. That way, it's always clear exactly what you're publishing.

Permissions on snapshots

One option is for the published pages to be visible to users with "view" permission, while versions after the published snapshot would be visible and editable to users with "edit" permissions.

Another option would be to assign ACLs to the snapshots - so you could have a number of different levels of visibility within a wiki. A public splash page, pages visible to registered challenge participants, and pages visible only to organizers. This could default to the same behavior as the previous option.

Implementation details

(incomplete, please add):

  • DB Table for snapshots.
  • Services to create and view snapshots.
  • Web UI for creating and viewing snapshots.
  • Code to determine which view a given user sees.