# Simple role-based entitlements

If you need to enforce feature access at the company subscription level ***and*** user role level (user permissions), you can combine your user role and permission services with Reflag.

For example, let's say your "Export to CSV" feature is only available to customers on the "Business" or "Enterprise" plans ***and*** only users with the "admin" role should be allowed to use it.

If you have complex user permissions, you likely need to use a dedicated user authentication service with Role-Based Access Control (RBAC) support.

If you have simple and static user permissions, like "admin" and "member", that don't change frequently, you may be able to hard code the access controls.

### Managing simple role-based user permissions

Let's look at how to handle the simple use case with Reflag.

If you zoom out, this is what controlling feature access at the customer subscription level looks like.

<figure><img src="/files/FIhiA3FZRufN0nYQu5l1" alt=""><figcaption></figcaption></figure>

To add simple user role controls to the mix, you can choose to hard code the user role check within the `isEnabled` check.

<figure><img src="/files/s8W8cQzohGQV6P8GNBSS" alt=""><figcaption></figcaption></figure>


---

# 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://docs.reflag.com/product-handbook/feature-entitlements/simple-role-based-entitlements.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.
