-
Notifications
You must be signed in to change notification settings - Fork 77
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
Allow setting role when inviting new user #1025
Conversation
What's the difference between the write, delete and admin roles? |
It just depends. They are defined in each controller. I think the next bigger task is to really define that and have it more central so it's easy to overview what each can/cannot do. In the meantime, the typical means are:
|
Since these are "roles" and we have a "role" called "admin", would different words make sense? I find read, write, and delete a little confusing - especially since "read" allows creation? Since our immediate requirement is to support a user that has access to device status and nothing else, can the roles be "admin" and "status"? Or another word besides "status"? And then delete the "read", "delete", and "write" roles? |
I misspoke. I went through some controllers and Yes, I do think that makes sense, but I also think it's a much bigger change than this PR. |
Thought right after submitting - the quick hack could be displaying the role as |
Wouldn't it be better if there was a layer of indirection here? I.e., the role would point to a set of fine grained permissions that would determine what could be done. Perhaps the set is trivially small now and having "if" statements all over won't be terrible. I'm ok with whatever you all think best on this. My desire would be to expose fewer roles while we still can so that we don't accidentally lock in confusing names as people start using them. |
Chatted offline. Going to only display the |
e0594f4
to
658b121
Compare
Upon reflection, I think we should use
I also think these names are more descriptive. |
What are your thoughts on three user roles:
|
I like those role names and these basic starting restrictions |
Same. Those roles sound good to me. |
b020f33
to
612be74
Compare
@fhunleth @jjcarstens this is ready for another review. |
612be74
to
1586cc7
Compare
from a PR review by @jjcarstens
|
Adds `role` to the invite stored for new users so they are created with the expected role.
Roles and permissions are going through an overhaul. In the meantime, this restricts the roles to `Admin` or `Read` permissions to reduce roles available for use until they are redefined
and switch to varchars instead of Postgres Enums
1586cc7
to
d8245da
Compare
Adds
role
to the invite stored for new users so they are created with the expected role.