# User Groups

User groups let you attach roles to a set of users at once — everyone in the group inherits those permissions.

:::tip
Groups are about _who_ shares access. For the ability bundles themselves, see [Roles](/roles.md). For the individual abilities inside those roles, see [Permissions](/permissions.md).
:::

## Overview

When more than a few people need the same access, don't assign [roles](/roles.md) to each [user](/users.md) one by one. Put them in a **user group**, attach the roles to the group once, and every member inherits them.

User groups are managed in the Control Panel under **Users → Groups**, and stored in `resources/users/groups.yaml`.

## Creating groups

Create and edit groups in the Control Panel, or by hand in YAML:

```yaml
# resources/users/groups.yaml
editors:
  title: Editors
  roles:
    - editor
```

Users can belong to multiple groups. Their effective roles are the union of roles assigned directly on the user and roles inherited through every group they're in.

## Assigning users to groups

In the Control Panel: open the user (or the group) and pick the relationship.

On a user YAML file:

```yaml
groups:
  - editors
```

Prefer groups over per-user role assignment whenever the same access pattern applies to a handful of people or more.

### In blueprints

Need a field that picks groups? Use the [User Groups](/fieldtypes/user-groups.md) fieldtype.

### On the frontend

Check whether the current user is in a group with [`{{ user:in }}`](/tags/user-in.md), or list groups with [`{{ user:groups }}`](/tags/user-groups.md).
