Skip to content
This repository has been archived by the owner on Jan 4, 2021. It is now read-only.

User access permissions on a per-page basis #596

Open
hdodov opened this issue Aug 11, 2020 · 3 comments
Open

User access permissions on a per-page basis #596

hdodov opened this issue Aug 11, 2020 · 3 comments

Comments

@hdodov
Copy link

hdodov commented Aug 11, 2020

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
Copy link
Member

afbora commented Aug 11, 2020

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
Copy link
Author

hdodov commented Aug 12, 2020

@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
Copy link
Member

afbora commented Aug 12, 2020

Related with #177 (may be same feature, i'm not sure)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants