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

More Tools for handling roles #49

Open
jacoby opened this issue Apr 1, 2016 · 1 comment
Open

More Tools for handling roles #49

jacoby opened this issue Apr 1, 2016 · 1 comment

Comments

@jacoby
Copy link

jacoby commented Apr 1, 2016

I'm just starting my dive into Dancer, and for my lab's purposes, I'm seeing a heavy use of roles. I'm happy to see things like require_role and require_any_role, and user_has_role and _user_roles _ will be very useful as well.

But I'm wanting to have the tools for handing account creation within the app, and while update_user seems to have most of the data points of a user handled, I am not seeing and cannot think through how to add a user role without rolling my own insert, and that sort of thing is what we're using DBIx::Class to avoid, isn't it?

So, I would like, along with user_has_role and user_roles, add_user_role and remove_user_role, hopefully working something like:

add_user_role 'bofh' , 'admin' ;
remove_user_role 'pfy' , 'helpdesk' ;

I am using the suggested users, roles, and user_roles tables.

@SysPete
Copy link
Member

SysPete commented Jun 16, 2016

@jacoby thanks for raising this issue: I agree that we need such methods. I'll add these soon (just have some other work to do 1st).

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

2 participants