Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
"zmi/styles/resources/zmi_base.js" allows adding content objects only if there is a "manage_findForm" action #506
Jens Vagelpohl wrote at 2019-2-15 12:25 +0000:
The author uses that as a way of guessing if the context is an object manager because those can have items added for example.
I suggest to use a non-empty options list for "#addItemSelect" (fed by the current context's "filtered_meta_types"), instead. This allows the current context to indicate whether or not it has something to add. It might be necessary to prevent acquisition in some way for the construction of this options list -- maybe inside "filtered_meta_types" for accessing "all_meta_types". I have hit this bug making "dm.zope.saml2" Zope 4 compatible. It has an object type ("SamlAuthority") which inherits from "IFAwareObjectManager" and "ObjectManager" but lacks a "manage_findForm" manage option, as such an option does not make much sense for "SamlAuthority" which is a one level container for (usually a small number of) SAML entities.…