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

user permissions: support for options broken #5147

Closed
jaro-io opened this issue Apr 13, 2023 · 1 comment · Fixed by #6649 or #6654
Closed

user permissions: support for options broken #5147

jaro-io opened this issue Apr 13, 2023 · 1 comment · Fixed by #6649 or #6654
Assignees

Comments

@jaro-io
Copy link

jaro-io commented Apr 13, 2023

hey there lovely kirby team 🌻
i am struggling with two things related to user permissions. i don’t know if they are related.
this is the other issue. feel free to merge if needed.

description

i would like users with some roles to be able to create only users with certain roles. for example a manager should be able to add an assistant. but an assistant shouldn’t be able to add a manager. both roles however should be able to add a customer. to me this sounds like a very common use-case.

i found this post by @texnixe from some time ago but the code doesn’t seem to work anymore. don’t know if it ever did, but seems like it. also seems like options have been removed from user blueprints, and now there’s only permissions. at least this is what the latest docs say. anyway, something like the code down below also doesn’t seem to work.

could you please let me know if this is a bug? or a feature request? i guess i could build a workaround with hooks. so when a user tries to create another user with a certain role, an error is being shown. but i would like if some users can’t even see all roles in the "add a new user" modal.

to reproduce

permissions:
    users:
        create:
            manager: false
            assistant: true
            customer: true

your setup

kirby 3.9.3

thank you for your help!
🤍 ✨

@afbora
Copy link
Member

afbora commented Apr 13, 2023

As I understand it, this is a issue we have had before and we are trying to solve it. According to @lukasbestle comment I see that this also valid for the create prop.

@distantnative distantnative self-assigned this Aug 11, 2024
@distantnative distantnative linked a pull request Aug 31, 2024 that will close this issue
@distantnative distantnative changed the title user permissions: roles don’t work as expected user permissions: support for options broken Aug 31, 2024
@distantnative distantnative linked a pull request Oct 12, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants