Hello everyone,
I’m relatively new to Kirby 4 and am impressed by the community. As a beginner, please bear with me.
Currently, I’m working on user-based access rather than role-based access in a blog project. My specific requirement is to grant User 1 access to only one particular template, while User 2 should have access to another template. I prefer a solution that can be managed entirely through the panel without manual code changes.
I’ve checked the documentation but couldn’t find a solution tailored to my needs. Is there a panel-driven method to achieve this?
Thank you in advance for your help!
Below is the yml code I am using to get the access page:
title: Contributor
fields:
page_access:
label: Page Access
type: pages
layout: cards
query: site.index.children
multiple: true
permissions:
access:
panel: true
site: true
settings: false
users: false
system: false
files:
create: false
changeName: false
delete: false
replace: false
update: false
site:
update: false
pages:
create: true # Disallow creating pages in general
read: false # Disallow reading pages
changeTemplate: false
changeTitle: false
changeSlug: false
changeStatus: false
move: false
duplicate: false
delete: false
hide: false
sort: false
update: false
user:
changeRole: false