I'm new to Sitefinity. I've built out an EventHub handler to react to items submitted to the Forms module that creates new items in a content type within a module built with Module Builder using the CreateDataItem method of the DynamicModuleManager class. This works OK if I submit the form data while logged in as an administrator. However, if I submit form data as an anonymous user, I get a System.UnauthorizedAccessException when my code hits the SaveChanges method of the DynamicModuleManager class.
How can I ensure that my EventHub-triggered code will run with full permissions, even if it is triggered by an anonymous user's action?
DynamicModuleManager dynamicManager = DynamicModuleManager.GetManager();