Skip to content
Protect pages for authenticated users
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github adjust default login page behavior May 28, 2019
blueprints/fields some labels adjusted Jun 3, 2019
examples/site/blueprints examples added May 23, 2019
src loginform artefacts moved in subfolder May 29, 2019
vendor kirby-uniform added May 28, 2019
.editorconfig Template import May 16, 2019
.gitattributes update gitattributes to ignore .github folder May 28, 2019
.gitignore pdated to be prepared for composer dependency May 28, 2019
.project Template import May 16, 2019 Template import May 16, 2019 version update Jun 3, 2019
composer.json version update Jun 3, 2019
composer.lock kirby-uniform added May 28, 2019
index.php loginform artefacts moved in subfolder May 29, 2019

Kirby Secured Pages

Version License Kirby

With this plugin for Kirby CMS you can prevent unauthorized users to access a page or a hierarchy of pages. The permission will be granted by a user group. If the user is not yet logged in, a login page will be displayed.


  • Kirby CMS, Version 3.x



Download and extract this repository, rename the folder to securedpages and drop it into the plugins folder of your Kirby 3 installation. You should end up with a folder structure like this:



If you are using Composer, you can install the plugin with

composer require kerli81/securedpages

Git submodule

git submodule add site/plugins/securedpages



To enable the configuration for the page security your blueprint needs to include the security field. Here an example ho such a page blueprint could look like.

title: Protected Page

  # main
  - width: 2/3
        type: fields
            type: textarea
            size: large
  # sidebar
  - width: 1/3
            type: fields
                security: fields/kerli81.securedpages.pageconfiguration
            type: pages
            type: files


User Group

The plugin will check if a user is part of a certain user group. To create such a group, create a *.yml file in folder blueprints/users/. You will find below an example of a group definition.

title: Webpage Access
description: Usergroup for frontend access

    panel: false

To use the group create a new user on the panel.

Secure a page incl. sub pages

Go to the page which you will protected and enable the protection. After you enabled it a user group selction field will be displayed. Select the just defined group.

Protection Configuration


Default Behavior

If you navigate to a page which is protected and you are not logged in or your user is not part of the correct user group, your request is forwarded to /no-permission. On this page a login form will be displayed. After correct login you will be forward to your requested page.

Adjust texts of default behavior

to adjust the texts just override the provided options:

Option Default Description Username Name of the field 'username'
kerli81.securedpages.loginform.username.error Please enter your username Error message for the field 'username' Password Name of the field 'password'
kerli81.securedpages.loginform.password.error Please enter your password Error message for the field 'password'

Login Form

display another error page

If you would like to show your custom error page, just update following options:

Option Value Description
kerli81.securedpages.logintype custom Will trigger the page to display. Possible values are: [loginform, custom] --- The url (url-slug) to navigate to.
You can’t perform that action at this time.