I am developing a content type which relies on a feature provided by another add-on (redomino.tokenrole). This add-on applies its token features to all conten types via a zcml configuration:
I want to undo the above configuration and just selectively apply the token feature to some content types. What is the canonical way of undoing the above? From my research, this can be done programatically by using implementsOnly( ) from zope.interface and via another product z3c.unconfigure.
The ZCML directive "class" does not change things in the ZODB - it has no persistent effects. If you ensure that the ZCML file including this directive is not "include"d, you will have the original state.
However, it is often difficult to avoid "include"ing a ZCML file. In those cases, "z3c.unconfigure" can help you. It allows to make individual ZCLM-directives in another ZCML-file ineffective.
z3c.unconfigure has nothing to do with Archetypes or Dexterity. It just unconfigures zcml directives. So, yes, it will work with ATContentTypes. Make sure to pin the 1.0.1 version: https://pypi.python.org/pypi/z3c.unconfigure/1.0.1