Give different users permission to edit different pages

Hey everyone!

To be honest, I’m kind of confused. I know user permissions were planned for 2.2, but now I’m not sure if I’ll be able to achieve what I want to achieve in the upcoming version. I’m faced with the following situation:

I have a pretty complex site structure. I want to be able to create an user (role), which is allowed to access the panel, but only edit specific pages (or specific subfolders). I don’t really care whether he can view the other pages in the panel, it’s just about restricting permission to edit (or save).

I hope that makes sense. Is there any way to achieve that in Kirby (2.2)?

Any help would be appreciated! Thanks so much!

David

1 Like

Yes, permissions were planned for 2.2, but I don’t think permissions will make it into the upcoming release, so there will be not out-of-the box solution yet.

We were planning permissions to be part of 2.2.
While basic permission handling has made it to the core, including it into the panel still takes time. We have been around with a few attempts but ultimately they didn’t feel right. 2.2 completely restructures/decrufts the panel, we don’t want to clog it again with just any implementation of permissions. Instead we want to find one that is neat, sustainable, and robust for the future of Kirby. Especially regarding the question of permissions per blueprint, we haven’t found a good way yet. But we will keep working on that, so user permissions for the panel will eventually made it into a release :wink:

Hi, I was wondering if user permissions are finally released with 2.3.x

I defined a new permission called “edit”, but

$user->hasPermission(‘edit’)

always returns 1.

Any hint? thanks

1 Like

Unfortunately, user permissions for the panel haven’t been implemented yet and as always, there is no ETA …

Kirby 2.3 contains some preparation code, but permissions itself have not yet been implemented. Permissions are high priority for us at the moment and we are working on it right now actually. However we can’t promise when it will be done. As written above, it needs time to make it robust and stable.
Please note that the API you are referring to ($user->hasPermission()) will likely be changed with the new implementation.

2 Likes

permissions would be soooo great to have. :smile_cat:

1 Like

ok thank you.

Waiting for some kirby upgrades, I added some logic to config.php:

//Kirby non ha ancora implementato le permission, per cui le tabello qui
c::set('hnt.roles.edit.admin',true);     
c::set('hnt.roles.edit.editor_a',true);
c::set('hnt.roles.edit.editor_b',true);
c::set('hnt.roles.edit.unactive',false);