getkirby / ideas

This is the backlog of ideas and feature requests from the last two years. Use our new feedback platform to post your new ideas or vote on existing ideas.
https://feedback.getkirby.com
20 stars 0 forks source link

User access permissions on a per-page basis #596

Open hdodov opened 4 years ago

hdodov commented 4 years ago

Problem

We have a site where an editor writes articles in a blog page. Obviously, we have an editor user role, but that user has access to all pages in the site, not just the blog.

Solution

The user blueprint could accept a permissions.content array that configures access:

title: Editor
permissions:
  access:
    settings: false
    users: false
  content:
    *: false
    blog: true
afbora commented 4 years ago

Correct me if I got it wrong, doesn't a template based solution solve your needs? 🤔

/site/blueprints/pages/blog.yml

title: Blog

options: 
  read: 
    admin: true
    editor: false
hdodov commented 4 years ago

@afbora I didn't know about that. It appears to get the job done, but I have a lot of templates - around 30-40. Configuring all of them isn't going to be very pleasant. Besides - what happens if I have two pages of the same template, yet I want only one of them to be editable?

Having the ability to restrict access on a per-template basis is definitely useful, but specifying page IDs is as well. Perhaps the biggest difference is you can disable all access with *: false

afbora commented 4 years ago

Related with https://github.com/getkirby/ideas/issues/177 (may be same feature, i'm not sure)