1.1 --- a/MoinForms.py Thu Nov 07 23:26:32 2013 +0100
1.2 +++ b/MoinForms.py Thu Nov 07 23:52:03 2013 +0100
1.3 @@ -21,7 +21,7 @@
1.4 except ImportError:
1.5 from StringIO import StringIO
1.6
1.7 -__version__ = "0.1"
1.8 +__version__ = "0.2"
1.9
1.10 form_field_regexp_str = r"<<Form(Field|Message)\((.*?)\)>>"
1.11 form_field_regexp = re.compile(form_field_regexp_str, re.DOTALL)
1.12 @@ -423,6 +423,20 @@
1.13 self.request = request
1.14 self.attributes = attributes
1.15
1.16 + def getAccessACL(self, access):
1.17 +
1.18 + """
1.19 + Return the form-specific ACL specified by 'access' with the "before"
1.20 + policy being used as the basis of the resultant policy.
1.21 + """
1.22 +
1.23 + cfg = self.request.cfg
1.24 +
1.25 + # Combine the "before" ACL with the form-specific policy.
1.26 +
1.27 + before_acl = [s.split(" ", 1)[1] for s in cfg.cache.acl_rights_before.getString().split("\n") if s.startswith("#acl ")]
1.28 + return security.AccessControlList(cfg, before_acl + [access])
1.29 +
1.30 def getACL(self):
1.31
1.32 """
1.33 @@ -432,7 +446,7 @@
1.34
1.35 if self.attributes.has_key("access"):
1.36 access = self.attributes["access"]
1.37 - return security.AccessControlList(self.request.cfg, [access])
1.38 + return self.getAccessACL(access)
1.39 else:
1.40 return Page(self.request, self.pagename).getACL(self.request)
1.41
1.42 @@ -489,7 +503,7 @@
1.43
1.44 if self.attributes.has_key("access"):
1.45 access = self.attributes["access"]
1.46 - acl = security.AccessControlList(self.request.cfg, [access])
1.47 + acl = self.getAccessACL(access)
1.48 policy = lambda request, pagename, username, action: acl.may(request, username, action)
1.49
1.50 # Otherwise, use the page permissions.
2.1 --- a/PKG-INFO Thu Nov 07 23:26:32 2013 +0100
2.2 +++ b/PKG-INFO Thu Nov 07 23:52:03 2013 +0100
2.3 @@ -1,12 +1,12 @@
2.4 Metadata-Version: 1.1
2.5 Name: MoinForms
2.6 -Version: 0.1
2.7 +Version: 0.2
2.8 Author: Paul Boddie
2.9 Author-email: paul at boddie org uk
2.10 Maintainer: Paul Boddie
2.11 Maintainer-email: paul at boddie org uk
2.12 Home-page: http://moinmo.in/ParserMarket/MoinForms
2.13 -Download-url: http://moinmo.in/ParserMarket/MoinForms?action=AttachFile&do=view&target=MoinForms-0.1.tar.bz2
2.14 +Download-url: http://moinmo.in/ParserMarket/MoinForms?action=AttachFile&do=view&target=MoinForms-0.2.tar.bz2
2.15 Summary: Permit the definition of flexible Web forms in wiki pages
2.16 License: GPL (version 2 or later)
2.17 Description: The MoinForms extension for MoinMoin provides a way of defining Web
3.1 --- a/README.txt Thu Nov 07 23:26:32 2013 +0100
3.2 +++ b/README.txt Thu Nov 07 23:52:03 2013 +0100
3.3 @@ -128,5 +128,24 @@
3.4 Packages Release Information
3.5 -------- -------------------
3.6
3.7 -MoinSupport Tested with 0.4.1
3.8 +MoinSupport Tested with 0.5
3.9 Source: http://hgweb.boddie.org.uk/MoinSupport
3.10 +
3.11 +New in MoinForms 0.2 (Changes since MoinForms 0.1)
3.12 +--------------------------------------------------
3.13 +
3.14 + * Changed the interpretation of form-specific "access" ACLs, combining them
3.15 + with the acl_rights_before configuration setting.
3.16 + * Added support for subpage storage of form data along with a parser to
3.17 + navigate from such data to a populated form showing such data.
3.18 +
3.19 +Release Procedures
3.20 +------------------
3.21 +
3.22 +Update the MoinForms __version__ attribute and the setup.py version details.
3.23 +Change the version number and package filename/directory in the documentation.
3.24 +Update the setup.py and PKG-INFO files.
3.25 +Update the release notes (see above).
3.26 +Tag, export.
3.27 +Archive, upload.
3.28 +Update the ParserMarket (see above for the URL).
4.1 --- a/setup.py Thu Nov 07 23:26:32 2013 +0100
4.2 +++ b/setup.py Thu Nov 07 23:52:03 2013 +0100
4.3 @@ -8,6 +8,6 @@
4.4 author = "Paul Boddie",
4.5 author_email = "paul@boddie.org.uk",
4.6 url = "http://moinmo.in/ParserMarket/MoinForms",
4.7 - version = "0.1",
4.8 + version = "0.2",
4.9 py_modules = ["MoinForms"]
4.10 )