It looks like customer community users can't create Account records because there is no create option in object settings for a customer community profile.
I thought that I could get around this if the page controller was using
without sharing. My client side code is accessing salesforce via remote action methods which are in a global without sharing class. My understanding was that the class would run in system mode which would mean that it would ignore user permissions and any object could be queried or inserted.
However, I am getting an OP_WITH_INVALID_USER_TYPE_EXCEPTION when trying to insert Account records when the user is a customer community user despite the fact that as I have said the class is
Is my understanding of without sharing wrong? Are the profile CRUD permissions still enforced even in without sharing mode?
Is there any way around this? In other words, how can I insert an Account record when the current user is a customer community user?
I think I was assuming that without sharing would allow the currently running user to get around CRUD permissions. But it only affects the actual sharing of objects. So, because the customer community users don't have the create permission for the Account object, they will never be able to create one.