Wiki workflow extension point patch
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.
If you have any issues, create a new ticket.
Download the zipped source from here.
General instructions on installing Trac plugins can be found on the TracPlugins page.
- 773 by stevegt on 2006-05-20 06:37:59
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
- 754 by stevegt on 2006-05-09 19:30:45
add IWikiModel extension point