AGX Proposal to improve support for creation_roles
Cyrille Bonnet <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.archetypes.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
First, thanks for all the good work you've put in ArchGenXML: it makes
my life some much better!
I've bumped into a small problem today: custom roles can't be used in
"creation_roles" tagged values.
The problem is described in a posting by Huron:
http://thread.gmane.org/gmane.comp.web.zope.plone.archetypes.devel/5456
Anyway, I've found a workaround: instead of setDefaultRoles, use the
following code
================================================================
obj = getattr(self, 'Plone')
obj.manage_permission('ATContentTypes: Add sensitive file',
['Manager',
'InternalStaff'], 0)
================================================================
(my Plone site has an id of "Plone", but one could look for an object of
type "Plone Site" or something like that?)
Maybe it would be a good idea to have ArchGenXML generate something like
that instead of using setDefaultRoles? Or am I missing something?
Cheers,
Cyrille
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642