ApprovePageAction

Description

This action makes it possible to use MoinMoin wiki for ISO 900x documentation or other documentation systems which require identification of document versions and approval status. The action allow a user with approve acl right to approve a revision of a page.

Installation

  1. Enable acl and add a new approve right in your wiki configuration:

    • acl_rights_valid = ["read",  "write",  "delete",  "revert",  "admin", "approve"]
      acl_enabled = 1
  2. Put ApprovePage.py in your wiki/data/plugin/action/ directory

  3. Put modified modern_iso.py in your wiki/data/plugin/theme/ directory

ApprovePage.py-20051108-2

modern_iso.py

Discussion

First, there is no need to include this in 1.5 core code, this should be a separate action, I may be included in the future if it is usable for many users, and after we review the code.

If you need this action directly on the editbar and want to support 1.3 wikis copy the method in your theme and change it,like its done inModernCmsTheme. If you need only to support 1.5, simplyoverrideeditbarItems, introduced in patch-100. --NirSoffer2005-10-18 15:11:32

I changed it to the editbarItems, have a look. Robert Penz 2005-11-08 15:52:00 RobertPenz

Another approach to ISO (Moin Moin 1.5.x only)

I needed add support for some ISO procedures to my company wiki, with some requirements:

I used the macro and the theme but modifed Page.py to fit my need.

Todo/Known Issues

The redirecting code to the last approved revision has a bug, when you log out is can sometimes enter in a loop

PageApproval.diff (Patch Against MoinMoin 1.5.8)

MatiasVidal <matiasv AT gmail DOT com> - 2008-02-12 00:56:22

Update

Here is an update for the theme and the action so that it also works on Moin >1.5. Please remove the version number. Do also create a in htdocs a new folder modern_iso, which should be a simple clone of the existing modern directory.

modern_iso2.py

approvepage2.py (Please do not change that in capital letters, just remove the version number..)

Moin 1.6.x

in order to get this action running on Moin >1.6 remove 'request, ' out of line 40 and 80 in approvepage.py

2008-04-10 FrankSteinhauer

Moin 1.7.x

Does anyone know what needs to be changed to have this running on Moin1.7.2?
In my case (updated from 1.6.3; running on IIS; Python 2.5.1) the header-info if approved or not is working on existing as well as new pages. The action it self does nothing / does not ask 'really approve?'. The page is just reloads.

Moin 1.9.1 (Solenoid theme)

I found a feature like this very useful, so I adapted the action and the theme modifications discussed on this page to an installation of Moin 1.9.1 and the Solenoid theme. Since I'm completely new to Python and Moin development, I would really appreciate if anybody with some experience could review the code. Is there any way to make it more portable to future versions of Moin? Do you see any obvious issues with the code? -- 2010-02-05 <lameike AT gmx DOT net>

Features

Screenshot

approval-history.png

Changes

An updated version of ApproveAction.py (placed in the wiki directory at data/plugin/action/ApprovePage.py): ApprovePage.py

A modified version of the Solenoid theme (placed in the wiki directory at data/plugin/theme/solenoid_iso.py): solenoid_iso.py Diff to solenoid.py 2009.12.5

A modified version of Page.py to display version information about a page (in Moin installation directory): Page.py Diff to Moin 1.9.1 Page.py

Extension for CMS themes

By patching page.py as follows, only approved pages are visible to unknow, non-logged-in-visitors (Patch against MoinDesktop 1.5.5a-1).

page.diff


Moin 1.9.3 (standard themes)

I upgraded the changes of Oliver Siemoneit, added some stuff of lameike and improved code a bit. The purpose is the same, add two new access rights (approve and review) and display only approved versions of a page if the review pragma is set.

Features:

Files:

Installation:

-- FrankSteinhauer 2010-11-18 10:44:48

Notes:

   1   ....
   2   # ignore processing instructions
   3             if self.in_processing_instructions:
   4                 found = False
   5                 for pi in ("##", "#format", "#refresh", "#redirect", "#deprecated",
   6                            "#pragma", "#form", "#acl", "#language", "#review"):
   7                     if line.lower().startswith(pi):
   8                         self.request.write(self.formatter.comment(line))
   9                         found = True
  10                         break
  11                 if not found:
  12                     self.in_processing_instructions = 0
  13                 else:
  14                     continue # do not parse this line

-- MatiasVidal 2014-03-31 18:01:08

MoinMoin: ActionMarket/ApprovePageAction (last edited 2014-03-31 18:05:10 by MatiasVidal)