-
Notifications
You must be signed in to change notification settings - Fork 3
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 group functionality is "broken" #3
Comments
I don't believe that role groups functionality must be For my needs I considered groups as roles superposition This approach implies, that we don't need to set up And so nested hash (not table as with roles case) Having just a hash 'group=>roles' (or may be you know better way to store such simple construct) - Of course, caching will be needed here anyway. What do you think about this approach? My point is that overcomplexity with groups is not needed here. |
The current role group approach follows exactly the design pattern you have describe here. In this design, users can not be members of role groups. The role groups is simply a way to group a set of roles (and currently implemented as a hash!). |
I think the role groups functionality needs some more work.
Each user should be able to join different groups, hence the need for a #role_groups column or a separate RoleGroup model with table similar to the functionality of role.
When a user joins a role_group, he could automatically be given the roles of that group, but what if he then is taken out of that group? Then we can't simply delete those same roles, as he might have had that role individually before. Bad idea!
Better then to just evaluate the role groups dynamically on demand. Later we could cache this result (fx by storing array of roles in the datastore), then invalidate the cache result for that user whenever his relationships with a role or role group changes, using event triggers? Note: We won't have support for nested role groups!
What do you think?
The text was updated successfully, but these errors were encountered: