|Version 3 (modified by stevegt, 9 years ago) (diff)|
Wiki Workflow Patch
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 you'll always get the entire history unless the HTTP request contains an explicit 'version=' argument.
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.
If you have any issues, create a new ticket.
Download the zipped source from here.
See the ./examples directory in the patch distribution tree for wikirandom, a toy workflow plugin that demonstrates the IWikiWorkflowController extension point API.
-  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!
-  by stevegt on 2006-05-15 02:08:18
-  by stevegt on 2006-05-09 19:30:45
add IWikiModel extension point