Hiya!
I’m currently diving into Kirby 3 and loving it so far.
For an online publication, I’ve set up two roles – admins who can edit everything and authors who should only be able to edit posts they’re the author of as well as create new blog posts.
I’ve successfully used hooks to prevent anyone who isn’t an admin from updating any page he’s not the author of.
However, instead of showing errors when someone tries to update a page without the necessary permissions, it would be more elegant to hide the page altogether. Essentially, I’d like to show one site blueprint to the admin, with a list of all pages, and one site blueprint to users with an ”author” role, with only those pages they are the authors of. (And an option to create a new blog post.)
I realise Kirby 3 is still quite young, but if anyone has any pointers as to how to achieve that, I’d appreciate it!
Check this example, it allows you to switch to different panel according to the user role.
It use the “custom folder setup” Kirby concept to choose which blueprint folder will be used by Kirby
“candidate” and “evaluator” are custom roles created in /site/blueprints/users/
“blueprintcandidate” and “blueprintevaluator” are folder created in site/ to host panel config files
Thank you, Gilles, for this solution. It helped me with a similar scenario. I find it a good workaround until the permission system in Kirby 3 gets updated.