Copy support with presence in the Add new object... dropdown

Bug #143505 reported by Peter Bengtsson
2
Affects Status Importance Assigned to Milestone
Zope 2
Invalid
Medium
Unassigned

Bug Description

As described also in this thread...
http://mail.zope.org/pipermail/zope/2005-August/161274.html

I want my disk based product objects to be copy'able but I don't want them to appear in the "Add new object..." drop down in the ZMI. These objects aren't meant to be created in the ZMI so it doesn't make sense to have them in that drop down. If I regiser the class in my __init__.py file I was hoping to use the visibility=None (passed to registerClass()) to remove it from the drop down in the ZMI but still make it copyable.

Tags: feature zope
Revision history for this message
Stefan H. Holek (stefanholek) wrote :

FWIW, I had the same request from a customer. Seems the copy-able check is a bit short-sighted here.

Revision history for this message
yuppie (yuppie3) wrote :

'visibility' controls if the meta_type is globally available (visibility='Global') or only in containers that specify one of its interfaces (visibility=None). So we can't use 'visibility' to control the visibility in the ZMI.

I propose to use an empty 'action' to control this. In Zope 2.9 the five:registerClass directive allows to set empty 'action' values and main.dtml filters them out.

Unfortunately _verifyObjectPaste uses a hack to work around an checkPermission issue, making 'action' required for copyable meta_types.

So the proposed solution creates a dependency on http://www.zope.org/Collectors/Zope/1774 . If that is resolved, _verifyObjectPaste could be easily implemented without using the 'action'.

Revision history for this message
Hanno Schlichting (hannosch) wrote :

I've stumbled over this myself at some point. It would be really nice if the ZMI visibility and copy/paste could be untangled.

Changed in zope2:
status: New → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

The zope2 project on Launchpad has been archived at the request of the Zope developers (see https://answers.launchpad.net/launchpad/+question/683589 and https://answers.launchpad.net/launchpad/+question/685285). If this bug is still relevant, please refile it at https://github.com/zopefoundation/zope2.

Changed in zope2:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.