4

Salesforce Alerted me that at the end of February we would be forced into the security update for "Secure guest user record access". I tried this in my sandbox and it seems to have some adverse effects. Queries for some pages in our portal always return 0 records no matter what. This is even after setting up a new sharing rule to give guest users read access to that object. It's strange that for some older custom objects (created back in ~2015) the update hasn't seemed to change anything. Guest users can still query and edit / create those records like normal. Am I just setting this up completely wrong? At the end of the day, will it no longer be possible for guest users to edit / create some custom objects? I have made no changes to the guest user profile before checking the "Secure guest user record access" checkbox.

Relevant page from salesforce does not make it clear how to give edit permissions. It makes it sound like read only is the only thing possible: https://help.salesforce.com/articleView?id=networks_guest_profile_best_practices.htm

5
  • Can you correlate your observations with the apex class' with/without sharing annotation?
    – cropredy
    Sep 26, 2019 at 21:47
  • @cropredy There's one page I know is affected by the "Secure guest user record access" change (since it works again once i disable the change). However, changing the controller to without sharing, or even making it global doesn't do anything -- it still doesn't work Sep 26, 2019 at 22:06
  • edit permissions for custom objects in the guest user profile can be found by Sites | click site label | manage Public Access button |
    – cropredy
    Sep 26, 2019 at 22:39
  • @cropredy Yeah that is how we have always set permissions for our org, but it seems like this change overrides whatever is set in the public access tab. I even tried giving all permissions I could possibly give using that tab for an object, but still the query returns zero results, even when i remove the where clause on it. We are still using Salesforce Classic, I don't know if that might make a difference Sep 27, 2019 at 15:03
  • I'm surprised by this; I suggest a call to SFDC support as the public access settings by object should be the way to do this
    – cropredy
    Sep 27, 2019 at 15:12

2 Answers 2

1

The issue appears to be that I needed to set up a sharing rule for Accounts and Opportunities (since I was querying those items via a relationship) even though I have read permissions specified on the Public Access Label.

3
  • Just wondering where you able to figure it out? I am doing some research on this, but everything stops working once I ticked the Secure guest user record access checkbox in sharing settigns.
    – manza
    Oct 21, 2019 at 4:10
  • 1
    @manza All i found is that you have to set up a sharing rule for literally everything -- honestly I don't understand why It doesn't work sometimes, but if I add a sharing rule to all objects related to the object i'm having trouble with it usually works Oct 22, 2019 at 14:31
  • I'm having the same problem, trying to query User object but adding a Sharing Rule for just the User object isn't working.
    – Jay
    Feb 10, 2020 at 21:34
0

I fixed this by creating a Sharing Rules to the object with an impossible filter (ex: Name != '!@#$') and by removing the sharing access modifier keyword on my class.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .