Hygraph
Docs
View as Markdown

#Roles

Roles determine what users can see and do in your Hygraph project. Each role carries a set of content permissions, which govern access to content entries, and Management API permissions, which determine what a user can do in the UI and through the API.

Hygraph provides five built-in system roles and supports custom roles for projects on enterprise plans. To access roles and permissions, navigate to Project Settings > Team > Roles & Permissions.

Roles and Permissions overviewRoles and Permissions overview

#System roles

System roles are built into every Hygraph project. They cannot be edited or deleted. Every system role can read content and the schema, and can open project settings, team settings, and apps.

RoleRights
OwnerAll Admin rights, and the ability to change billing settings, clone, share, and delete the project.
AdminAll Developer rights, and the ability to manage team members and create or update projects.
DeveloperAll Editor rights, and the ability to create, update, and delete models and enumerations.
EditorAll Contributor rights, and the ability to delete content.
ContributorAbility to create and update content.

For system roles, Admins and Owners can:

  • Click a system role to view its permissions. Permissions for system roles are read-only.
  • Click Assign members on the role row to assign team members to that role.

#Custom roles

Custom roles let you define exactly what a user can see and do, without exposing features that are not relevant to their work. Only project Admins and Owners can create and manage custom roles.

When configuring a custom role, always include the Read and Read versions content permissions. Without Read, users cannot open content entries. Without Read versions, versioning will not display correctly in the content editor.

#Create a custom role

  1. Under Custom roles, click Add custom role.
  2. Enter a Name for the role and optionally a Description.
  3. Click Create.

Add custom roleAdd custom role

The new role is created with default Management API permissions. It does not get content permissions yet. Click the role to add content permissions and adjust Management API permissions.

#Configure content permissions

Content permissions determine what actions users can perform on content entries in the content editor.

Add a permission
  1. Click on the custom role in the roles table to open its permissions screen.
  2. Under Content permissions, click Add permissions. If there are no content permissions yet, the empty state offers Add permissions and Initialize defaults. Initialize defaults grants Read on all models for all locales, scoped to the default public content delivery stage.
    • Use the Model dropdown to select the model to apply permissions to. Select All to apply them across all models.
    • Use the checkboxes to select the actions to grant. Some actions reveal additional options for Locales and Stages.
  3. Click Create to save.

For what each action means, including locales and stages, see Content permissions. For how to scope a permission by model, locale, stage, environment, or condition, see Scope content permissions.

Edit a permission

Edit is available only when the permission has locale or stage settings. Click the context menu for a custom role, and click Edit. You can update the locale or stage for the content permission.

Edit permissionsEdit permissions

Delete a permission

Click the context menu for a custom role, and click Delete. Confirm the deletion in the dialog that appears. This action is permanent and cannot be undone.

Delete permissionsDelete permissions

#Configure Management API permissions

Management API permissions control both API access and UI visibility.

  1. Click on the custom role in the roles table.
  2. Under Management API, the table lists all available permissions. Enabled permissions are toggled on. You can perform the following actions:
    • Use Group by Domain or Group by Action to group the list.
    • Filter the list with All permissions, Enabled permissions, or Disabled permissions.
    • Use the toggles to enable or disable individual permissions.
    • Use the checkboxes to select multiple permissions, and then enable or disable them in bulk.

Some Management API permissions are UI-only and have no effect on a PAT. For what each permission does for roles versus tokens, see Management API permissions.

#Manage custom role

Manage custom roleManage custom role

#View permissions

Click the custom role to view the content and Management API permissions associated with it. You can:

  • Sort permissions alphabetically by model or action.
  • Filter permissions by action, model, locale, and stage.
  • Assign new members to the role by clicking Assign members at the top right.

Permissions for system roles are read-only. To add or change permissions on that screen, see Configure content permissions and Configure Management API permissions.

For combined permission sets for a job, such as a read-only reviewer or a publisher, see Permission combinations by job.

#Assign members

Before assigning a user to a role, they must be invited to the project. To assign project members to a custom role:

  1. Under the Custom roles section, click Assign members next to the role name.
  2. Select one or more team members using the checkboxes.
  3. Click Save changes.

#Duplicate role

System roles cannot be duplicated. To duplicate a custom role:

  1. Under the Custom roles section, click ... to open the context menu for the role.
  2. Click Duplicate role.

The copied role includes the source role's Management API permissions and content permissions in every environment. Assigned members are not copied.

Duplicating a role requires the Create new roles permission, and a custom role seat must be available on the plan.

#Delete role

System roles cannot be deleted. You can permanently delete a custom role. To delete a custom role:

  1. Under the Custom roles section, click ... to open the context menu for the role.
  2. Select Delete role.
  3. Confirm the deletion in the popup.

This action cannot be undone.

#What's next