If the page permission is set to Yes in the blueprint of the role, then the role can modify any page of site, can you specify a specific page range?
I want to set up a contributor’s role, they can create and edit, delete their own pages, but don’t break other people’s pages.
You can currently only set permissions on a per role basis, not for individual users. So to achieve this, you would have to set up a role for each user or you would need a hook that checks for individual users.
Sorry, I mean, a role can only edit parts of the page.
For example, this role is only responsible for one column.
I don’t need to target a user.
site\blueprint\users\editor.yml
title: editor
permissions:
access:
panel: true
site: true
settings: false
users: false
pages:
create: true
delete: true
update: true
...
Yes, I want the editor to edit only specific pages, not others, such as pages posted by administrators.
But now he can modify any page on the website.
Can this be done in kirby 3?
There are two places where you can set page permissions:
- The user role blueprint, like the one you posted above. Those contain the general rules what a user role can or cannot do.
- You can set permissions on a per page blueprint basis (so not individual pages but pages with given blueprint). That means you can define what user role can read, edit, changeStatus of pages, see the docs: https://getkirby.com/docs/guide/users/permissions#specific-permissions-in-page-file-user-or-site-options
On top of that, you can use hooks to further restrict certain user actions: https://getkirby.com/docs/guide/users/permissions#controlling-permissions-with-hooks
As a last resort, you can even define different blueprints per user role: Custom blueprint for different roles
Thank you texnixe! A perfect answer.