Hi,
jfroche and I will need to make releases of z3c.table and z3c.batching.
Can someone grant me access on PYPI ?
Thanks
userid: gotcha
--
Godefroid Chapelle (aka __gotcha) http://bubblenet.be
Background:
In Zope 2 prior to Zope 2.12, registering a new permission involved the
following (usually behind-the-scenes) steps:
1. adding the permission name to the
AccessControl.Permission._registeredPermissions dictionary
2. adding a tuple to the Products.__ac_permissions__ list including the
permission name and default roles
3. setting a attribute (with name equal to a mangled version of the
permission name) of
AccessControl.Permission.ApplicationDefaultPermissions to the default roles
4. registering the permission as a Zope 3 permission using the
<permission> ZCML directive
In practice in CMF-based applications, the first 3 items of this list
were often accomplished by a call (usually during product
initialization) to Products.CMFCore.permissions.setDefaultRoles. So for
a developer adding a new permission, there were generally 2 tasks
required (calling setDefaultRoles and calling the <permission> directive).
In Zope 2.12, the situation improved. There is now an event handler
which automatically performs steps #1-3 when a permission is registered
using the <permission> directive, setting the default role to Manager.
Unfortunately, this makes things tricky if one wants to register a
permission with a different set of default roles. That's because
setDefaultRoles (and its new incarnation as
AccessControl.Permission.addPermission in Zope 2.13) abort if you try to
register a permission that is already registered, so it needs to be
called prior to the execution of ZCML actions -- so import time is the
only option.
Proposal:
As an alternative to requiring calling setDefaultRoles/addPermission at
import time, I suggest that we add an optional roles attribute to the
<permission> directive. This would then be used when the directive is
executed, instead of the current hard-coded Manager setting. Examples:
<!-- a new permission with 2 default roles -->
<permission id="my.NewPermission" title="My new permission"
roles="Manager SiteAdmin"/>
<!-- a new permission with Manager as the sole, implicit role
(backwards-compatible) -->
<permission id="my.OtherPermission" title="My other permission"/>
Thoughts? One downside is that we would need to override the permission
directive instead of using the implementation in zope.security. On the
other hand, it's not a complicated directive.
thanks for your consideration,
----------
David Glick
Web Developer
davidglick(a)groundwire.org
206.286.1235x32
Groundwire: You Are Connected
http://groundwire.org
Hi All,
If I got to the "Interfaces" tab of a Page Template in the ZMI of a
plain Zope 2.12 instance, it simply renders the template.
Should that tab be there?
cheers,
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
Hi All,
If a PageTemplate's content type is set to text/plain, the edit form
bombs out with:
2010-08-18 19:40:01 ERROR Zope.SiteErrorLog 1282156801.210.45371719052
http://localhost:8080/index_html/pt_editAction
Traceback (innermost last):
Module ZPublisher.Publish, line 127, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 47, in call_object
Module Products.PageTemplates.ZopePageTemplate, line 198, in
pt_editAction
Module Products.PageTemplates.ZopePageTemplate, line 163, in pt_edit
Module Products.PageTemplates.utils, line 80, in convertToUnicode
TypeError: decoding Unicode is not supported
Has anyone else seen this?
cheers,
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
Hi again,
late, but here it is:
We have an IRC meeting coming up in about an hour.
Topics, if nothing else comes up, will be
- upcoming bug day
- test noise reduction
- how to choose topics for the weekly meeting
Hope to see you later,
Christian
--
Christian Theune · ct(a)gocept.com
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development