restrict Add drop-down list in Folder Contents view
I have a Folder and I want to restrict the types of objects the managers of that folder can add to it. In the Security tab, I can limit the kinds of objects that can be added, and this works fine, but the forbidden objects still show up in the drop down list in the Contents view. I know I can create a ZClass derived from ObjectManager and just select the limited set of Subobjects, but this imposes extra overhead and a proliferation of specialized container ZClasses. I would really just like a Folder where the manager sees only the kinds of objects he has the permission to add in the 'Add' select list. Any suggestions on how I can do this? Thanks, John Hunter Zope 2.5.x
That's one of the features of OrderedFolder. http://dev.zope.org/Members/srichter/Products/OrderedFolder Florent John Hunter <jdhunter@ace.bsd.uchicago.edu> wrote:
I have a Folder and I want to restrict the types of objects the managers of that folder can add to it. In the Security tab, I can limit the kinds of objects that can be added, and this works fine, but the forbidden objects still show up in the drop down list in the Contents view.
I know I can create a ZClass derived from ObjectManager and just select the limited set of Subobjects, but this imposes extra overhead and a proliferation of specialized container ZClasses. I would really just like a Folder where the manager sees only the kinds of objects he has the permission to add in the 'Add' select list.
Any suggestions on how I can do this?
-- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 10 http://nuxeo.com mailto:fg@nuxeo.com
"Florent" == Florent Guillaume <fg@nuxeo.com> writes:
Florent> That's one of the features of OrderedFolder. Florent> http://dev.zope.org/Members/srichter/Products/OrderedFolder Thanks for the tip. I am encountering an install problem. After I unpack the tarball in lib/python/Products and restart Zope, when I try to add an Ordered Folder I get the following attribute error: Error Type: AttributeError Error Value: 'None' object has no attribute 'blocks' and the following trace: Traceback (innermost last): File /usr/local/Zope-2.5.1b1-src/lib/python/ZPublisher/Publish.py, line 150, in publish_module File /usr/local/Zope-2.5.1b1-src/lib/python/ZPublisher/Publish.py, line 114, in publish File /usr/local/Zope-2.5.1b1-src/lib/python/Zope/__init__.py, line 159, in zpublisher_exception_hook File /usr/local/Zope-2.5.1b1-src/lib/python/ZPublisher/Publish.py, line 98, in publish File /usr/local/Zope-2.5.1b1-src/lib/python/ZPublisher/mapply.py, line 88, in mapply (Object: folderAdd) File /usr/local/Zope-2.5.1b1-src/lib/python/ZPublisher/Publish.py, line 39, in call_object (Object: folderAdd) File /usr/local/Zope-2.5.1b1-src/lib/python/Shared/DC/Scripts/Bindings.py, line 252, in __call__ (Object: folderAdd) File /usr/local/Zope-2.5.1b1-src/lib/python/Shared/DC/Scripts/Bindings.py, line 283, in _bindAndExec (Object: folderAdd) File /usr/local/Zope-2.5.1b1-src/lib/python/App/special_dtml.py, line 172, in _exec (Object: folderAdd) File /usr/local/Zope/lib/python/Products/OrderedFolder/NoBabelTag.py, line 22, in __call__ File /usr/local/Zope/lib/python/Products/OrderedFolder/NoBabelTag.py, line 17, in render AttributeError: (see above) Thanks, John Hunter
participants (2)
-
Florent Guillaume -
John Hunter