You need to sign in to do that
Don't have an account?
Sharing Settings and Guest Users
I am trying to do 2 things:
1 - have one user (API user) who has access to only contact records of a specific record type
2 - use a force.com site as a webhook to record unsubscribes from an outside email marketing system
I had the force.com site webhook working great when I had our Sharing Settings set to Contacts: Public Read/Write. But I had to change the setting to Private in order to restrict the access of the API user and now the webhook no longer works because the Guest User of that site can no longer edit the Email Opt Out field. The field accessibility is not the problem, as it was working before I changed Sharing Settings and I've double checked.
Does anyone have any idea on how I can accomplish both of these tasks? Is there another way to restrict the access of that user without changing the Sharing Settings of the Contact object to Private and then creating exceptions?
Are you using standard controllers for the page that allows the editing of the Email Opt Out field?
Actually, it's a custom controller created by the email marketing company (MailChimp). Here is the apex class body:
This class is declared as with sharing, which means it will respect the sharing rules of the current user - in this case the guest user won't have any access to these records. You could change this to without sharing, which would give access to all data.
There's more information in this at:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_keywords_sharing.htm
Hello Bob
I was encountering the same problem with my site guest user login and accessing standard object (with Sharing Setting set to PRIVATE)
But when i changed the Apex Controlelr defination from 'with sharing' to 'without sharing', i can access the Object.
Just wondering if its the correct way / workaround. Will there be any CONS to this alternative?
Thanks
Sid
Hello emlizmue
I am facing the same issue. Have you used the same solution advised by Bob or come up with some other alternative?
Thanks
Sid
We never did get this to work long-term. It worked for a while and when it stopped working we were never able to determine if the error was caused by a change we made or a change that MailChimp (the provider of the code above) made.