I have a custom object that I want to create records for from a VF page on Sites. I am presenting a handful of input fields and a "save" button, and want to present a message when the save is successful.
The Sites user profile has permissions to the VF page and the associated custom controller, as well as create/edit on the custom object and all its fields. As part of a custom
save() method, I redirect to a new page (to which the Sites user also has access) to display the 'submitted' message; then a trigger on the custom object takes over. The actions class called by the trigger is also available to the Sites user.
From the debug log the controller appears to be working correctly, as well as the initial processing of the trigger, but then I get the 'Insufficient Privileges' error:
CODE_UNIT_FINISHED| on trigger event BeforeInsert for [new]
The after insert trigger uses the new record's Id to create another type of object, and the Sites user has create/update on that object and the relevant fields as well.
How can I figure out what privileges are missing? Not being able to login as the Sites user from the UI feels very limiting.