> For the complete documentation index, see [llms.txt](https://manual.gnrx.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://manual.gnrx.com.br/gnrx-gestao-de-acidentes-manual/estruturas/usuarios/atribuir-role.md).

# Atribuir uma role a um usuário

Dê a um usuário as permissões de uma role.

## Atribuir uma role a um usuário

**Para que serve:** dar a um usuário as permissões de uma role.

{% hint style="info" %}
**Quem pode fazer:** Administrador, com a permissão de gerenciar roles de usuários.
{% endhint %}

### Antes de começar

* Escolha a role. Veja [Entender as roles](https://github.com/victor-gnrx/gnrx-manual/tree/main/epi/configuracoes-iniciais/usuarios/o-que-sao-roles.md). Se nenhuma servir, [crie uma role](https://github.com/victor-gnrx/gnrx-manual/tree/main/epi/configuracoes-iniciais/usuarios/criar-role.md).

### Passo a passo

{% stepper %}
{% step %}

#### Abra o usuário

Clique em **Estruturas › Usuários**. Na coluna **Ações** do usuário, clique no ícone de olho.
{% endstep %}

{% step %}

#### Adicione a role

No cartão **Roles Atribuídas**, clique em **Adicionar Nova Role**. Escolha a role e clique em **Adicionar**. Aparece **Role adicionada com sucesso!**.

<figure><img src="https://78381333-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpdiZ9NLqfYTZVo183Wxj%2Fuploads%2Fgit-blob-95b25d638116a4d32c323418b521349f6dbb9f56%2Fusuarios-role-01.png?alt=media" alt="Cartão Roles Atribuídas com a escolha de uma nova role e o botão Adicionar"><figcaption><p>Adicionar nova role</p></figcaption></figure>
{% endstep %}
{% endstepper %}

{% hint style="info" %}
**Outro caminho:** em **Configurações › Roles & Permissões** (no Treinamento, **Configurações › Roles e Permissões**), abra a role e clique em **Adicionar Usuário**. Deixe **Unidade** e **Setor** como Global. Quem limita o que a pessoa vê são as [unidades vinculadas ao usuário](https://github.com/victor-gnrx/gnrx-manual/tree/main/epi/configuracoes-iniciais/usuarios/vincular-unidades.md).
{% endhint %}

### Deu errado?

{% hint style="warning" %}
**"Acesso Restrito: Você não tem permissão para gerenciar roles"**: só o Administrador atribui roles.
{% endhint %}

### Dúvidas comuns

<details>

<summary>E se o usuário tiver duas roles?</summary>

As permissões se somam. Se qualquer uma delas exigir verificação em duas etapas, o código passa a ser pedido no login.

</details>

<details>

<summary>A role muda o que a pessoa vê?</summary>

A role muda o que ela pode **fazer**. O que ela **vê** depende das [unidades](https://github.com/victor-gnrx/gnrx-manual/tree/main/epi/configuracoes-iniciais/usuarios/vincular-unidades.md) e dos [módulos](https://github.com/victor-gnrx/gnrx-manual/tree/main/epi/configuracoes-iniciais/usuarios/liberar-modulos.md) dela.

</details>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://manual.gnrx.com.br/gnrx-gestao-de-acidentes-manual/estruturas/usuarios/atribuir-role.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
