# HG changeset patch # User Paul Boddie # Date 1360103433 -3600 # Node ID 715ac86352dc24fb279e1ac060c02243c5da17ae # Parent bb4e763711e922cc9e9fa6b3139be5677f542576 Added fixes for page reviewer testing and MoinMoin 1.9 group page access. Updated the release notes and copyright information. diff -r bb4e763711e9 -r 715ac86352dc ApproveChangesSupport.py --- a/ApproveChangesSupport.py Sun Oct 16 19:57:59 2011 +0200 +++ b/ApproveChangesSupport.py Tue Feb 05 23:30:33 2013 +0100 @@ -11,7 +11,8 @@ be allowed to review changes, they must be present in a different group (by default "PageReviewersGroup"). - @copyright: 2011 by Paul Boddie + @copyright: 2011, 2013 by Paul Boddie + 2013 by Jakub Jedelsky 2003-2007 MoinMoin:ThomasWaldmann, 2003 by Gustavo Niemeyer @license: GNU GPL (v2 or later), see COPYING.txt for details. @@ -23,7 +24,7 @@ from MoinMoin.wikiutil import escape import re -__version__ = "0.1" +__version__ = "0.1.1" space_pattern = re.compile("(\s+)") group_member_pattern = re.compile(ur'^ \* +(?:\[\[)?(?P.+?)(?:\]\])? *$', re.MULTILINE | re.UNICODE) @@ -42,7 +43,7 @@ def is_reviewer(request): return request.user.valid and ( - has_member(request, get_approved_editors_group(request), request.user.name) or \ + has_member(request, get_page_reviewers_group(request), request.user.name) or \ request.user.isSuperUser()) def is_approved(request): @@ -203,7 +204,7 @@ page.saveText(body, 0, comment=_("Added %s to the approved editors group.") % username) # Utility classes and associated functions. -# NOTE: These are a subset of EventAggregatorSupport. +# NOTE: These are now present in MoinSupport which should be used in future. class Form: @@ -253,6 +254,6 @@ if hasattr(request.dicts, "has_member"): return request.dicts.has_member(groupname, username) else: - return username in request.dicts.get(groupname, []) + return username in request.groups.get(groupname, []) # vim: tabstop=4 expandtab shiftwidth=4 diff -r bb4e763711e9 -r 715ac86352dc PKG-INFO --- a/PKG-INFO Sun Oct 16 19:57:59 2011 +0200 +++ b/PKG-INFO Tue Feb 05 23:30:33 2013 +0100 @@ -1,12 +1,12 @@ Metadata-Version: 1.1 Name: ApproveChanges -Version: 0.1 +Version: 0.1.1 Author: Paul Boddie Author-email: paul at boddie org uk Maintainer: Paul Boddie Maintainer-email: paul at boddie org uk Home-page: http://moinmo.in/ActionMarket/ApproveChanges -Download-url: http://moinmo.in/ActionMarket/ApproveChanges?action=AttachFile&do=view&target=ApproveChanges-0.1.tar.bz2 +Download-url: http://moinmo.in/ActionMarket/ApproveChanges?action=AttachFile&do=view&target=ApproveChanges-0.1.1.tar.bz2 Summary: Queue untrusted page changes for approval License: GPL (version 2 or later) Description: The ApproveChanges action for MoinMoin, along with the queue_for_review event diff -r bb4e763711e9 -r 715ac86352dc README.txt --- a/README.txt Sun Oct 16 19:57:59 2011 +0200 +++ b/README.txt Tue Feb 05 23:30:33 2013 +0100 @@ -146,6 +146,14 @@ Copyright and licence information can be found in the docs directory - see docs/COPYING.txt and docs/LICENCE.txt for more information. +New in ApproveChanges 0.1.1 (Changes since ApproveChanges 0.1) +-------------------------------------------------------------- + + * Fixed page reviewer access to changes. Many thanks to Jakub Jedelsky for + pointing out an obvious bug in the access logic (checking approved users + instead of reviewers) and non-functioning usage of the MoinMoin 1.9 API + to access group pages. + Release Procedures ------------------ diff -r bb4e763711e9 -r 715ac86352dc docs/COPYING.txt --- a/docs/COPYING.txt Sun Oct 16 19:57:59 2011 +0200 +++ b/docs/COPYING.txt Tue Feb 05 23:30:33 2013 +0100 @@ -1,7 +1,11 @@ Licence Agreement ----------------- -Copyright (C) 2011 Paul Boddie +Copyright (C) 2011, 2013 Paul Boddie + +Some patches provided by the following contributors: + +Copyright (C) 2013 Jakub Jedelsky Some pieces of MoinMoin code were used in this work - typically pieces which demonstrate how to perform various essential tasks diff -r bb4e763711e9 -r 715ac86352dc setup.py --- a/setup.py Sun Oct 16 19:57:59 2011 +0200 +++ b/setup.py Tue Feb 05 23:30:33 2013 +0100 @@ -8,6 +8,6 @@ author = "Paul Boddie", author_email = "paul@boddie.org.uk", url = "http://moinmo.in/ActionMarket/ApproveChanges", - version = "0.1", + version = "0.1.1", py_modules = ["ApproveChangesSupport"] )