# Show different controls by role

> Use a Role Section to show different content to different roles on the same position, and preview what each role sees. Pro and Enterprise only.

A **Role Section** is a section type that swaps its own contents depending on which role the current user is identified as: useful when the same position should look different for a director than for a camera operator, without building and maintaining two separate positions.

<callout color="red" title="Important">
  Role Sections are available on **Pro** and **Enterprise** licenses only. A Role Section decides what to show by identifying who is using the panel, and identity-based section authentication is a Pro and Enterprise feature. On other license tiers, **Role Section** doesn't appear in the canvas's **Create...** menu (and its shortcut, `O`, does nothing), and the editor's **View as role** and **Simulate NFC** controls aren't shown.
</callout>

## Before you begin

- A **Pro** or **Enterprise** license.
- At least one Role already created: see [Create roles and assign permissions](/docs/buttons/v1.10/access/roles-and-permissions).
- A way for users to identify themselves at the panel, such as sign-in or NFC: see [Set up PIN and NFC sign-in](/docs/buttons/v1.10/access/pin-and-nfc).
- A sense of which distinct views different roles actually need: a Role Section works best with a small number of clearly different views, not one per individual user.

## Add role views to a section

1. Select an area of the canvas, right-click, and choose **Create... → Role Section** (shortcut `O`). You can also add one inside a shared section or a cuelist.

![The right-click menu open on an 8 by 2 selection, with Role Section highlighted under Create… and its O shortcut shown](https://bitfocus.io/api/docs-media/file/create-role-section-menu.png?prefix=docs-media)

2. In the inspector, open the **Navigation** tab and find **Role views**: it starts empty, with **No role views** and **"Add a role view to choose which roles can see its contents."**

![The Role Section's Navigation tab with an empty Role views list showing No role views, an Add role view button, and the Scroll setting](https://bitfocus.io/api/docs-media/file/no-role-views.png?prefix=docs-media)

3. Select **Add role view**, choose one or more roles for it, and select **Create role view**.

![The Add role view list with the roles Admin, EIC, Manager, Operator, and Viewer, Operator ticked, and a Create role view button](https://bitfocus.io/api/docs-media/file/add-role-view.png?prefix=docs-media)

4. Build that view's contents as you would any other section.
5. Repeat for each distinct view you need. Each view is automatically labeled from the roles assigned to it (for example, "Director + Camera Op"); you can also give it its own icon and border color to make it easy to tell apart while editing.

![The Role views list with an Operator view in blue and an EIC view in amber, each with buttons for editing roles, choosing an icon, choosing a color, and deleting the view](https://bitfocus.io/api/docs-media/file/role-views-list.png?prefix=docs-media)

While editing, the picker in the section's label bar on the canvas chooses which view you're looking at and building. Besides each view, it also lists **Locked** and **Role view selector**, so you can check what the section shows before anyone has identified and when someone matches more than one view.

![The Role Section showing the EIC view with Aux 1 to 4 buttons, and the label bar's view picker open with Locked, Role view selector, Operator, and EIC](https://bitfocus.io/api/docs-media/file/role-view-picker.png?prefix=docs-media)

![The same Role Section showing the Operator view in blue, with Cam 1 to 6 buttons and a sign-out button in its top-right cell](https://bitfocus.io/api/docs-media/file/operator-view.png?prefix=docs-media)

To change a view's roles later, use its **Edit roles** action. Its context menu also offers **Duplicate**, **Rename**, and **Delete**: deleting a view removes any items that only exist on that view, so move anything you want to keep to another view first.

## Choose how identification works

A Role Section's **Authentication Mode**, on its **Authentication** tab, is limited to the two role-based modes also available on other sections:

![The Role Section's Authentication tab with the Authentication Mode list open, offering User role (selected) and User role + PIN](https://bitfocus.io/api/docs-media/file/authentication-modes-1.png?prefix=docs-media)

- **User role**: require one of the roles assigned to a view.
- **User role + PIN**: require one of those roles, plus the identified user's personal PIN.

See [Protect critical controls when needed](/docs/buttons/v1.10/positions/basic-sections#protect-critical-controls-when-needed) for how identification itself happens (login, NFC, and so on): a Role Section reuses that same mechanism and adds role-matching on top.

## Understand what a user actually sees

- If no role view has any roles assigned at all yet, the section renders completely empty: there's nothing to gate on.
- Before anyone has identified, the section is locked and shows a button for identifying, such as an **ID** button for an NFC card.

![The Role Section in its Locked state, showing only an ID button with an NFC symbol in its first cell](https://bitfocus.io/api/docs-media/file/locked-state.png?prefix=docs-media)

- Once a user is identified, Buttons checks their roles against every view's assigned roles:
- **No match**: the section stays empty and identification resets, as if no one had identified yet.
- **Exactly one match**: that view's contents display directly.
- **More than one match** (the user holds roles tied to several different views): Buttons shows a picker with one button per matching view, plus a way to log out, so the user chooses which view to enter.

![The Role view selector, with an Operator button in blue and an EIC button in amber, and a sign-out button in the section's top-right cell](https://bitfocus.io/api/docs-media/file/role-view-selector.png?prefix=docs-media)

On a Stream Deck Studio, the same section goes through these states as people identify with their NFC cards:

![A Stream Deck Studio with the Role Section locked, showing only an ID button with an NFC symbol](https://bitfocus.io/api/docs-media/file/surface-locked.png?prefix=docs-media)

![The same Stream Deck Studio after a user with both roles identified, showing the Operator and EIC view buttons and a sign-out button](https://bitfocus.io/api/docs-media/file/surface-role-selector.png?prefix=docs-media)

![The same Stream Deck Studio after choosing Operator, showing Cam 1 to 6 and the sign-out button in the section's top-right cell](https://bitfocus.io/api/docs-media/file/surface-operator-view.png?prefix=docs-media)

For a user who matched more than one view, the button in the section's top-right cell first returns from the chosen view to the picker. Pressing it again in the picker signs out, and the section locks again.

## Preview a role's view while building

While editing a position, you can walk through a Role Section the way an operator meets it:

1. Select **View as role** (the eye button in the toolbar) and choose the role to test. **Default** returns to your own roles.
2. Select the ring button next to it, **Simulate NFC card read**. It's only available once you've chosen a role.

   A simulated operator holding that role identifies, as if they'd presented an NFC card. The Role Section opens the matching view, or the Role view selector when the role matches more than one view. With **User role + PIN**, the section shows the PIN pad first and accepts any PIN.

![The toolbar with the Simulate NFC and View as role buttons, and the View as role menu open with Default ticked above Admin, EIC, Manager, Operator, and Viewer](https://bitfocus.io/api/docs-media/file/view-as-role-menu.png?prefix=docs-media)

In Buttons 1.8.13 and later, the preview behaves like this:

- Role Sections start locked in the editor, as they do on a surface. Only **Simulate NFC card read** logs an operator in.
- The editor never logs in as you. Your own roles and PIN aren't used, so testing a section doesn't count against your PIN attempts on real surfaces.
- Choosing a view in the section's label bar to edit it doesn't count as a login.
- Each simulated card read starts at the Role view selector again.
- A **Logout Session** action run from the editor only logs out the editor's preview. Operators logged in on the position's surfaces stay logged in.

The preview has no effect on how real devices evaluate identification, and doesn't change what's actually stored.

## How this relates to Roles and Permissions

A Role Section draws its list of roles from the same Roles you manage in [Create roles and assign permissions](/docs/buttons/v1.10/access/roles-and-permissions), but assigning a role to a view is a separate, independent thing from that role's resource permissions (its Read/Update/Delete grants on positions, connections, and so on). Giving a role access to a view only controls what that role can *see* here; it doesn't grant or depend on any CRUD permission. Conversely, who can *edit* the section itself (open the position, shared section, or cuelist it lives in) is governed entirely by the normal permission grants, not by the section's own role-view assignments.

There's no separate way to sign in as a specific user to confirm their exact effective access: outside of the editor's **View as role** preview, the only way to confirm what a real user sees is to have them (or you, temporarily holding that role) actually sign in.

## If you get stuck

| What you see | What to try |
| --- | --- |
| **Role Section** is missing from the **Create...** menu, or **View as role** is missing from the toolbar. | Role Sections need a Pro or Enterprise license: check your license tier under **Settings → License**. |
| The section is completely empty for everyone. | Confirm at least one role view has roles assigned: an unassigned Role Section always renders empty. |
| A user sees nothing after identifying. | Their roles don't match any role view's assigned roles: check which roles they actually hold against each view's **Edit roles** list. |
| A user with two roles gets a picker instead of their view directly. | That's expected when their roles match more than one view: they choose which one to enter. |
| A Role Section stays locked in the editor. | Expected in Buttons 1.8.13 and later. Choose a role with **View as role**, then select **Simulate NFC card read**. To build a view, choose it in the section's label bar instead. |
| You want to confirm what a specific person will see. | Use **View as role** during editing for a quick check, or have that person actually sign in for a fully accurate result: there's no admin "sign in as" feature. |

## Where to go next

- [Create roles and assign permissions](/docs/buttons/v1.10/access/roles-and-permissions)
- [Set up PIN and NFC sign-in](/docs/buttons/v1.10/access/pin-and-nfc)
- [Organize controls in a section](/docs/buttons/v1.10/positions/basic-sections)
