# Data access control via target object

Through DataControl objects is possible control the access to data  of the logged user for a given object connected to the target.&#x20;

For instance if we want to give access only to voyages connected with the business units that the user belong to, a DataControl object like this has to be posted:

```

{
    "matcherTarget": "BusinessUnit",
    "matcherAttributeTarget": "users.key",
    "objectName": "Voyage",
    "attribute": "voyageHeader.businessUnit"
}
```

* **matcherTarget** defines the Dataloy object that has to be used as target object
* **matherAttributeTarget** defines the attribute in the object target that links the object with the user
* **objectName** the Dataloy object that has to be applied the access control
* **attribute** the attribute name that link the  Dataloy object with the target object


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.dataloy.com/api-release-8.25/user-guides/enterprise-functionality/data-access-control-via-target-object.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
