"Define Permissions" in ZMI Products
One more stupid question ... I've made a few python based external products and am comfortable setting default permissions with those but this is my first foray into a ZMI based product. I've largely followed the ZooExhibit product in the Zope Book (what I'm trying to do is not at all complex but I wanted something distributable ... the ZooExhibit really does fit the general pattern of what I'm trying to do). I have a folder named 'OETemplate' which mirrors the 'exhibitTemplate', and when I install an instance of this product that template works all hunkey-dorey. What I'd like to do is set some default permissions on some of the objects inside that template. Specifically there is a subfolder which I would like to set default permissions for adding & changing files. I've found the "Define Permissions" tab but for the life of me can't really grok the concept. I'm getting the sense that perhaps "you can't get there from here" in what I'm trying to do and that "Define Permissions" is not really the right task I want to use to set default perms for a folder, but there is also not a "Security" tab (which is what I originally figured I'd need to use, I thought that Define Permissions would be to create new permissions). Thanks -J
Jeff Gentry wrote:
I've made a few python based external products and am comfortable setting default permissions with those but this is my first foray into a ZMI based product.
Stop right there ;-) Go back to external products, they're the right way to do this stuff. ZMI-based products (aka ZClasses) are now deprecated and will finally be going away in Zope 2.10... cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Stop right there ;-) Go back to external products, they're the right way to do this stuff. ZMI-based products (aka ZClasses) are now deprecated and will finally be going away in Zope 2.10...
Fair enough then. :) That raises two followup questions for me. a) One of the reasons I was doing this in ZMI (other than it is just mainly just a few very short bits of python) was that the people setting this up will be uploading a folder of HTML files via WebDAV or whatever into the product folder. These HTML files will be what the end users are actually interacting with, although they call into the python code. This worked via the ZMI as a form would declare its action as 'foo', and 'foo' would be found one level up in the Product's main directory. In the past when I've worked with external products, all of my template, dtml, html, etc files have already been predefined and I've explicitly declared them in my code. for instance, to use a dtml file I would say something like: blah = DTMLFile('dtml/blah', globals()) And then if function 'foo' had 'return blah', it would return that page on the client end. Here, I don't know what the files are ahead of time, and if I have 'foo' return dtml/blah.dtml it doesn't render properly (as in it renders it purely as text). So other than me once again just not doing things the way I was trying to do them :), is there a good way to set this up? And: b) What's the best way besides the mailing list to stay up to date with a lot of this stuff. I ask because when I look at Plope I see a link to the 2.7 Zope Book. When I try to find a copy of the Zope Developer Guide it points me to the 2.4 version. Most of what I've learned comes from those two guides and looking at other products - but then I'll end up seeing this or that which I picked up from XYZ product is "the wrong way to do it now", yet I'm not sure where the appropriate documentation for "the right way to do it now" would be if a lot of the docs I find on zope.org and other places are pointing to outdated techniques and such. Thanks again -J
Jeff Gentry wrote at 2006-3-15 15:55 -0500:
... In the past when I've worked with external products, all of my template, dtml, html, etc files have already been predefined and I've explicitly declared them in my code. for instance, to use a dtml file I would say something like: blah = DTMLFile('dtml/blah', globals())
You can let your class derive from "OFS.ObjectManager.ObjectManager" (or maybe "OFS.Folder.Folder"). Then you can put objects into them.
... b) What's the best way besides the mailing list to stay up to date with a lot of this stuff. I ask because when I look at Plope I see a link to the 2.7 Zope Book.
It is all voluntary work... And documentation is less fun than code... The 2.7 edition is still a good reference. What's new in Zope 2.8 is essentially the integration of Zope3 via Five. You may look for a Five description to learn what that means.
When I try to find a copy of the Zope Developer Guide it points me to the 2.4 version.
This is still valid. Only when you want to use the new Zope3 feature via Five, you will have to consult a Five description (and maybe read a Zope3 book).
Most of what I've learned comes from those two guides and looking at other products - but then I'll end up seeing this or that which I picked up from XYZ product is "the wrong way to do it now"
Do not worry too much. The right/wrong way is not absolute/objective but relative/subjective. -- Dieter
On Thu, 16 Mar 2006, Dieter Maurer wrote:
You can let your class derive from "OFS.ObjectManager.ObjectManager" (or maybe "OFS.Folder.Folder"). Then you can put objects into them.
Yeah, the problem that I thought was going to exist didn't, as it turned out.
It is all voluntary work... And documentation is less fun than code...
Oh I fully understand, that wasn't a criticism, just a query of where best to look so as to try to lower the number of stupid questions I ask :) Thanks for the info. -J
participants (3)
-
Chris Withers -
Dieter Maurer -
Jeff Gentry