Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Role permissions are not inherited with extends #6167

Open
owzim opened this issue Jan 17, 2024 · 0 comments
Open

Role permissions are not inherited with extends #6167

owzim opened this issue Jan 17, 2024 · 0 comments

Comments

@owzim
Copy link

owzim commented Jan 17, 2024

To reproduce

  1. quickly boot up a kirby startekit:
git clone [email protected]:getkirby/starterkit.git
cd starterkit
composer install
php -S localhost:3001 kirby/router.php
  1. create site/blueprints/users/base.yml:
fields:
  foo:
    type: text
permissions:
  users:
    create: false
    delete: false
    update: false
  access:
    settings: false
    users: false
  1. create site/blueprints/users/editor.yml:
extends: users/base
title: editor

login with an editor user and go to http://localhost:3001/panel/users

  1. you can see the fields are inherited

image

  1. you can still add users, although users.create: false

image

  1. you can still edit other users fields, although: users.update: false

  2. if you put the permissions in site/blueprints/users/editor.yml directly:

title: editor
permissions:
  users:
    create: false
    delete: false
    update: false
  access:
    settings: false
    users: false

Everything works as expected.

conclusion:

with extends fields are inherited, but permissions are not.
This is unexpected, since all other blueprints can be orchestrated in this manner.

Your setup

kirby: 4.0.3 and 3.10.0
php: 8.2.13

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

No branches or pull requests

1 participant