[Product-Developers] how to enable Global Allow in code?

Maarten Nieber maarten at usecm.com
Thu Dec 1 17:15:17 UTC 2011


The following approach works

        portal_types = portal['portal_types']
        typeinfo = portal_types.getTypeInfo('my.product.applicationproduct')
        typeinfo.global_allow = True
        import transaction; transaction.commit()

        portal.invokeFactory(
            'Folder',
            'folder',
            title=u"folder"
        )
        folder = portal['folder']

        folder.invokeFactory(
            'my.product.applicationproduct',
            'applicationProduct',
            title=u"Application Product"
        )
        applicationProduct = folder['applicationProduct']

Problem solved, thanks!
Maarten



More information about the Product-Developers mailing list