---
schema_version: "1"
id: c76e53d5abca8371316f790d033509f02c94c5b899a1364789dedfbaf9f37914
title: Data Access Control
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/salesforce-pages-developers-guide/guides/pages/security/pages-security-tips-data-access-control.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-security-tips-data-access-control.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: b4971c04ea40bbc97cc3559822fce2b6a2b18742c6b0d7009642515d6f1cebcd
products:
  - Visualforce Developer Guide
  - Platform Developer Content
---

# 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.

```apex
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.

