Skip to content Skip to footer navigation

User Groups

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

Hot Tip!

Groups are about who shares access. For the ability bundles themselves, see Roles. For the individual abilities inside those roles, see Permissions.

A troll pointing a teaching stick

Overview#

When more than a few people need the same access, don't assign roles to each user 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:

# 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:

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 fieldtype.

On the frontend#

Check whether the current user is in a group with {{ user:in }}, or list groups with {{ user:groups }}.