function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
anthony_idanthony_id 

How to Limit Objects Searched in Communities Global Search?

With Communities replacing portals in Summer '13, we've been working to convert our current customer portal and add many of the features afforded with Communities.  One of the features is "Global Search" but it seems to have a huge security/privacy hole (at least for our customers) in that it returns People and their associated Companies. Our customers would NOT like that data exposed to other people without their consent.

 

I see that Salesforce is limiting thee objects searched in the UI in their https://success.salesforce.com/ site (upper right hand corner) - we would like to lock our search down to only a few objects in a similar way. How do we do this? I haven't found any configuration, component or code or any documentation relating to this feature. If anyone can point me in the right direction, it would be much appreciated.

 

Thanks

Best Answer chosen by Admin (Salesforce Developers) 
anthony_idanthony_id

Found my answer after much digging and poking around. Not at all intuitive nor clear from the docs.

 

Administration Setup > Security Controls > Sharing Settings > External User Settings

Uncheck the Community User Visibility box.

 

The objects still show up on the left hand side, but no results are returned.

 

I would recommend having this OFF by default, rather than ON as privacy settings should always be opt-in rather than opt-out.

All Answers

Vinita_SFDCVinita_SFDC

Hello Anthony,

 

In search results in a community, users can see what they have access to through their profiles or permission sets in addition to what is explicitly shared with them in the community. This may include internal company content and records not explicitly shared in the community. For example, if the user’s profile allows access to account information, and the accounts tab isn’t made visible in the community, the user is able to access account information from their search results.

 

So user can not see the search results on which they do not have access. Still if you wish to make only few object available for community search then you will have to override the community page with a Visualforce page and show objects as per your requirement.

 

Reference: https://help.salesforce.com/apex/HTViewHelpDoc?id=networks_search_behavior.htm&language=en_US

anthony_idanthony_id

Found my answer after much digging and poking around. Not at all intuitive nor clear from the docs.

 

Administration Setup > Security Controls > Sharing Settings > External User Settings

Uncheck the Community User Visibility box.

 

The objects still show up on the left hand side, but no results are returned.

 

I would recommend having this OFF by default, rather than ON as privacy settings should always be opt-in rather than opt-out.

This was selected as the best answer