wiki:WikiWorkflowPatch

Version 1 (modified by stevegt, 8 years ago) (diff)

New hack WikiWorkflowPatch, created by stevegt

Wiki Workflow Patch

Description

As wiki SPAM gets worse, and as people start using trac for more critical projects, there needs to 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's "default viewable page". This makes things easy.

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, if you're viewing the default version of a page, even if it's not the highest version number, you'll still get the entire history.

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. I do hope to get this patch into mainstream, so I'm all ears if anyone has any suggestions.

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.

Example

See the ./examples directory in the patch distribution tree for a toy workflow plugin.

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

Author/Contributors

Author: stevegt
Contributors:

TagIt(patch,stevegt,alpha,0.9)?