---
schema_version: "1"
id: 8f736c23a172088c4e691db661595464ef03d23a47066e180003de8b4ca3018b
title: Data Access Control
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexcode/pages_security_tips_data_access_control.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/pages_security_tips_data_access_control.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: d3c9db338650c5833c3c9ece839e5b742f169b984b42d217b291484a76aa4372
description: The Salesforce Platform makes extensive use of data sharing rules. Each object has permissions and can have sharing settings that users can read, create, edit, and delete. These settings are enforced when using all standard controllers.
---
# Data Access Control

The Salesforce Platform makes extensive use of data sharing rules. Each object has permissions and can have sharing settings that users can read, create, edit, and delete. These settings are enforced when using all standard controllers.

When using an Apex class, the default behavior is tp respect built-in user permissions and field-level security restrictions during execution, that is, as if the class were declared as with sharing. For example, consider this Apex pseudo-code.

public class customController { 
    public void read() { 
        Contact contact = \[SELECT id FROM Contact WHERE Name = :value\]; 
    } 
}

In this case, only contact records for the current user are searched.

The platform uses the security sharing permissions of the user currently logged in, rather than granting full access to all records.