> For the complete documentation index, see [llms.txt](https://docs.reflag.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.reflag.com/product-handbook/feature-entitlements/simple-role-based-entitlements.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.reflag.com/product-handbook/feature-entitlements/simple-role-based-entitlements.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
