Skip to content

Kirby 3.5.7.1

Roles

Kirby's user management is based on a simple role system. By default, Kirby is configured to provide just an admin role, but you can add your own roles. Roles can be assigned to users in the users section of the Panel.

Admins

The admin role is mandatory and cannot be removed. Users with that role have all permissions, while other roles might have limited permissions.

Creating your own roles

To create a new user role, add a new user blueprint to /site/blueprints/users:

  • /site/blueprints/users/admin.yml
  • /site/blueprints/users/editor.yml
  • /site/blueprints/users/reviewer.yml

Each user blueprint must have a title. Other content - like custom form fields or permission settings - are optional.

The user role blueprint can be used to set additional custom user fields for each user role, as well as to define permissions based on this role.

Example user blueprint:

/site/blueprints/users/default.yml
title: Default

tabs:
  address:
    label: Address
    icon: text
    sections:
      address:
        type: fields
        fields:
          street:
            label: Street
            type: text
          zip:
            label: ZIP
            type: text
            width: 1/4
          city:
            label: City
            type: text
            width: 3/4
          country:
            label: Country
            type: text

  info:
    label: Additional info
    icon: twitter
    sections:
      info:
        type: fields
        fields:
          website:
            label: Website
            type: url
            width: 1/2
          twitter:
            label: Twitter
            type: text
            icon: twitter
            width: 1/2
          bio:
            label: Bio
            type: textarea