> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codenullapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authorization

> All the authorization system works based on Role Access and each user must have one role assigned.

All the authorization system works based on Role Access and each user must have one role assigned.

There are two ways to give access to a role

* Authorization By Feature
* Authorization By Role

### Authorization By Feature

1. Open the page you want to give access to.
2. Open the right menu and click on ***Feature permissions**.*
3. You will see the current feature and the roles available in the application
4. On this page, you need to select the roles you want to give access to the feature and then click on the Save button.

<img src="https://mintcdn.com/codenull/9RtgKoAtzvpYtN-c/images/-Mgm3nCWDaugBHDOElPG.png?fit=max&auto=format&n=9RtgKoAtzvpYtN-c&q=85&s=fcb8013466b8d56357b9ef4817ca7d4d" alt="Feature permissions" width="451" height="234" data-path="images/-Mgm3nCWDaugBHDOElPG.png" />

<img src="https://mintcdn.com/codenull/9RtgKoAtzvpYtN-c/images/-Mgm34dWs5SYLvXrYO36.png?fit=max&auto=format&n=9RtgKoAtzvpYtN-c&q=85&s=63c30c2056f26746e0c884056c552784" alt="Add roles by feature" width="1442" height="578" data-path="images/-Mgm34dWs5SYLvXrYO36.png" />

### Authorization By Role

#### Features Level

1. In the application open the right menu and click on Application designer.
2. Scroll down until the Roles table and click on the role you want to give access to the features.
3. You will see all the features available for the application and then you choose the feature you will give access to the selected Role, then click on the Save button.

<img src="https://mintcdn.com/codenull/9RtgKoAtzvpYtN-c/images/-Mgm51AFHskfYDh5Owep.png?fit=max&auto=format&n=9RtgKoAtzvpYtN-c&q=85&s=a0b93f094bb11ea1cb848e0f8a893088" alt="Drawer settings" width="393" height="223" data-path="images/-Mgm51AFHskfYDh5Owep.png" />

<img src="https://mintcdn.com/codenull/9RtgKoAtzvpYtN-c/images/-Mgm4wgKzfNLb5COGl0J.png?fit=max&auto=format&n=9RtgKoAtzvpYtN-c&q=85&s=06a85f3e35fa503f3ac0efe7b76e2dab" alt="Roles list" width="855" height="501" data-path="images/-Mgm4wgKzfNLb5COGl0J.png" />

<img src="https://mintcdn.com/codenull/9RtgKoAtzvpYtN-c/images/-Mgm4ouFgiLRNj0_G47f.png?fit=max&auto=format&n=9RtgKoAtzvpYtN-c&q=85&s=80c322c09fc4416ae098f88cc649e15d" alt="Configure permissions by Role" width="1650" height="599" data-path="images/-Mgm4ouFgiLRNj0_G47f.png" />

<Info>
  Here you can also provide Designer access, be careful to only give access to the right users or roles. To identify a Designer feature, they will have a ***Designer*** prefix.
</Info>

<img src="https://mintcdn.com/codenull/9RtgKoAtzvpYtN-c/images/-MgozG4URYNBVncUl92r.png?fit=max&auto=format&n=9RtgKoAtzvpYtN-c&q=85&s=aea0784dfdd4719705daa44acfdd7bb2" alt="Designer Features" width="2266" height="920" data-path="images/-MgozG4URYNBVncUl92r.png" />

<Info>
  After you generate a CRUD for an entity, you must give permissions to have access to the new created features.
</Info>

#### Components Level

You can restrict access even at a component level for each component. You can restrict the access to avoid modifications or even to hide any component for any role.

For custom features (React code), controls are wrapped with the `Authorization` component and configured per role directly from the feature's edit view. See [Component Permissions](/configurations/authorization/component-permissions) for the full configuration reference.

<img src="https://mintcdn.com/codenull/9RtgKoAtzvpYtN-c/images/-MjI-uNdVG-lSC9xn2jI.png?fit=max&auto=format&n=9RtgKoAtzvpYtN-c&q=85&s=2787134cb7e1c3ef132dc0fc93f47cb4" alt="" width="1338" height="830" data-path="images/-MjI-uNdVG-lSC9xn2jI.png" />
