After Summer’14 release you can prevent users from sharing their own user records with other users across the organization. You can also set Organization-Wide Default for user object to Private. This feature are available in Professional, Enterprise, Performance, Unlimited, and Developer Editions.
Business Use case :- Higher management in Universal Container doesn’t want to allow their users to share own user records with other users and on the record detail page they don’t want to allow users to see owner’s details (When user click on owner name they drill-down to user record detail page).
Solution of above business requirement
Before Summer’14 release the Sharing button was available on all user detail pages for organizations with User Sharing. This button enables a user to grant others access to the user’s own user record, a method that is known as manual sharing. Now you can Enable or disable the Sharing button for all users. To solve above business requirements follow the below instructions
1) Click on Name | Setup | Administration Setup | Security Controls | Sharing Setting
2) Click on Edit in the Organization-Wide Defaults area
3) Set Organization-Wide Default for User object to Private and deselect Manual User Record Sharing checkbox to display the Sharing button on the user detail page, as shown in the following screenshot
4) Click on Save.
Note :- After Summer ’14 release organizations that are enabling User Sharing get the Sharing button hidden on all user detail pages by default. When the organization-wide default for users is set to Public Read Only, users get read access to all other user records, can see those users in search and list views, and can interact with those users on Chatter and Communities.
It’s time to test this feature
To test this feature I am login with a different user whom having read only access on another user’s Lead records. In this demo I took the example Lead object to test (OWD Private for user object).
1) Navigate to your User detail page and now page doesn’t contains Sharing button, it will look like the following screenshot
2 ) Navigate to Lead record records and click on Owner Name as shown in the following screenshot
It will redirect you a new page where it will display error message “A full profile is unavailable because you don’t have access to this user.“same like the following screenshot
Pros and Cons of setting Organization-Wide Default for User to Private
1) If OWD is set to private, than you can follow to those users in Chatter for which you having read only access to their user record
2) If you have disabled the Community User Visibility checkbox in the Sharing Settings page, community users can only be seen by themselves and their superiors in the role hierarchy.
3) To Share the user records you can write sharing rule.