Come creare un oggetto saltando i controlli di sicurezza?
Up to Table of Contents
Alcune volte può essere utile creare un oggetto saltando i controlli, magari perchè si deve aggiungere un tipo di oggetto non consentito nella folder corrente.
La risposta a questa domanda sta direttamente nel codice (Products.CMFPlone.utils, plone versione 3.0.5), come documentato nella docstring:
def _createObjectByType(type_name, container, id, *args, **kw):
"""Create an object without performing security checks
invokeFactory and fti.constructInstance perform some security checks
before creating the object. Use this function instead if you need to
skip these checks.
This method uses some code from
CMFCore.TypesTool.FactoryTypeInformation.constructInstance
to create the object without security checks.
"""
...