Reference

Guide

User blueprint

User blueprints are located in /site/blueprints/users and control the Panel setup, form fields and permissions for a user role.

Blueprint location

  • /site/blueprints/users

Default user blueprint

To create the same set of fields for all roles, you can setup a default.yml that is used whenever no custom role blueprint is configured.

  • /site/blueprints/users/default.yml

Title and description

The title is required and will appear in the list of selectable roles when a new user is created. An optional description can be displayed as well:

title: Client
description: The client can edit all pages

Translated titles

Title and description can be translated by passing an array of translations with the matching language code as key:

title: 
  en: Client
  de: Kunde
description: 
  en: The client can edit all pages
  de: Der Kunde kann alle Seiten bearbeiten

Permissions

The permissions option can be used to restrict access to certain actions for the particular role. By default, all actions are allowed and you can deny them by passing false.

acccess

Option Value
panel true/false
users true/false
site true/false
settings true/false

Example: Prevent accessing user management and settings

permissions:
    access:
        settings: false
        users: false

file

Option Value
changeName true/false
create true/false
delete true/false
replace true/false
update true/false

Example: Prevent deleting files

permissions:
    file:
      delete: false

page

Option Value
changeSlug true/false
changeStatus true/false
changeTemplate true/false
changeTitle true/false
create true/false
delete true/false
preview true/false
update true/false

Example: Prevent deleting and creating pages and changing their template

permissions:
    page:
        delete: false
        create: false
        changeTemplate: false

site

Option Value
update true/false

users

The users setting can be set generally to false to prevent the user from editing, adding or deleting other users.

users: false

It is also possible to set the users options individually.

Option Value
changeEmail true/false
changeLanguage true/false
changeName true/false
changePassword true/false
create true/false
delete true/false
update true/false

Example:

permissions:
    access:
        users: true
    users:
        delete: false
        create: false
        changeRole: false

user

This option refers to each user with this role.

Option Value
changeEmail true/false
changeLanguage true/false
changeName true/false
changePassword true/false
changeRole true/false
create true/false
delete true/false
update true/false

Example

This user can access the user management, but not edit other users. The user cannot change their own role or delete themselves.

permissions:
    access:
        users: true
    users: false    
    user:
        delete: false
        changeRole: false

Using wildcards

It's also possible to restrict access to entire blocks by just passing false to the block:

permissions:
    page: false

Examples

You can find examples of user blueprints in the samples section.