wiki:WikiWorkflowPatch

Wiki workflow extension point patch

Description

As Trac wiki spam gets worse, and as people use Trac for critical projects, there is a need for be a lightweight, Trac-ish way of allowing plugins to do page edit workflow. Since Trac wiki pages don't currently have much in the way of state or other attributes, there's really only one "state" that we need to control, and that is "default viewable page".

This patch adds an IWikiWorkflowController extension point, which simply does these things:

  • provides a get_default_version() function which any plugin can use to select the default viewable version of a wiki page, rather than leave it hardcoded as "highest version number"
  • provides a would_collide() function which allows any plugin to override edit collision detection -- useful when you need to allow users to create new versions of a page based on other than the most recent version of text

This patch also fixes page history queries such that you'll always get the entire history unless the HTTP request contains an explicit 'version=' argument, and makes any explicit 'version=' argument more sticky during edit, preview, and delete operations.

So far these are the only significant things I've found that need to be touched in order to enable wiki workflow; please feel free to let me know if you find any others.

Bugs/Feature Requests

Existing bugs and feature requests for WikiWorkflowPatch are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from here.

Source

You can check out WikiWorkflowPatch from here using Subversion, or browse the source with Trac.

Installation

General instructions on installing Trac plugins can be found on the TracPlugins page.

Example

See the ./examples directory in the patch distribution tree for wikirandom, a toy workflow plugin that demonstrates the IWikiWorkflowController extension point API.

Recent Changes

773 by stevegt on 2006-05-20 06:37:59
WikiWorkflowPatch:

fix a nasty bug that was causing commits to be skipped for new pages
-- thanks pacopablo!

763 by stevegt on 2006-05-15 02:08:18
WikiWorkflowPatch:

add IRequestPostProcessor

754 by stevegt on 2006-05-09 19:30:45
WikiWorkflowPatch:

add IWikiModel extension point

(more)

Author/Contributors

Author: stevegt
Maintainer: stevegt
Contributors:

Last modified 5 months ago Last modified on Dec 15, 2015, 4:49:47 AM