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

# Advanced Access Control with ReBAC

> Learn how CybeDefend leverages Role-Based and Relationship-Based Access Control to provide granular security within your organization.

CybeDefend uses a **dual approach** to access control:

1. **RBAC** (Role-Based Access Control) assigns predefined roles, such as Admin or Viewer, to users within specific teams or projects.
2. **ReBAC** (Relationship-Based Access Control) extends this model by considering relationships—like membership in multiple organizations or teams, each with unique roles.

<Frame>
  <img src="https://mintcdn.com/cybedefend/aDLcTBG2HfZKnk8v/images/get-started/general-information/rebac-management.png?fit=max&auto=format&n=aDLcTBG2HfZKnk8v&q=85&s=6df506c786728388c5e292ae51ec6b37" alt="RBAC & ReBAC Management" style={{ borderRadius: '0.5rem' }} width="1325" height="996" data-path="images/get-started/general-information/rebac-management.png" />
</Frame>

<Note>
  ReBAC goes beyond basic role checks by examining the user’s relationship with an entity, allowing more <strong>flexible</strong> and <strong>fine-grained</strong> access rules.
</Note>

***

## What is ReBAC?

**Relationship-Based Access Control (ReBAC)** defines permissions based on the **relationship** between a user and an entity (e.g., “Alice is an Admin in Team1,” or “Bob is a Viewer in OrgA”). This approach is ideal for complex organizations that require nuanced distinctions between user roles and multiple groups or teams.

### Key Advantages of ReBAC

* **Granular Permissions**: Distinguish between different teams, projects, or business units with dynamic relationships.
* **Scalable Model**: As new users, teams, or roles are added, ReBAC easily adapts without significant refactoring.
* **Flexible Hierarchies**: Handle nested relationships (e.g., sub-teams) without needing to define every possible role combination in advance.

***

## Open-Source ReBAC: react-rebac

CybeDefend has also developed an **open-source** library called [**react-rebac**](https://github.com/CybeDefend/react-rebac) to simplify **relationship-based access control** in **React** applications. This library:

* **Manages** user relationships with multiple entities (e.g., organizations, teams).
* **Conditionally Renders** content based on user roles or relationships.
* **Supports** single-entity mode and multi-entity mode (checking if the user has access to *any* of several entities).

***

**Related:** [Assigning Roles](/latest/get-started/account-setup/assigning-roles) · [Managing Access](/latest/get-started/account-setup/managing-access-org-teams) · [react-rebac on GitHub](https://github.com/CybeDefend/react-rebac)
