# Access Control For Tenants

Once you have proper roles and role resolvers added into your project the next step comes to setup proper [access controls (ACL)](https://loopback.io/doc/en/lb2/Controlling-data-access.html) for REST apis.

You can setup the correct ACL for each built-in method or [remote methods](http://loopback.io/doc/en/lb3/Remote-methods.html) through javascript (`<model>.js` files) or you can add ACL rules in `<model>.json` file.

## Example

For example, lets setup some ACL rules in organization model for a custom method names `addProductsInBulk` through `organization.json` file

```
...
"acls": [
        {
            "accessType": "EXECUTE",
            "principalType": "ROLE",
            "principalId": "adminForOrg",
            "permission": "ALLOW",
            "property": "addProductsInBulk"
        },
        {
            "accessType": "EXECUTE",
            "principalType": "ROLE",
            "principalId": "userForOrg",
            "permission": "ALLOW",
            "property": "addProductsInBulk"
        },
    ]
...
```


---

# 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://shoppinpal.gitbook.io/docs-shoppinpal-com/4.-multi-tenancy-with-loopback/access-control-for-tenants.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.
