Tn/add groups#762
Conversation
NOTE: doesn't yet show groups with no users
ui is still a little rough
doesn't check content - need to figure out typing issue
the work complexity I would need to introduce to get either of these todos to work isn't worth it (IMO)
with a few outstanding todos
still have some todos to iron out
add type of state object Co-authored-by: Joel Smith <joel.smith@originate.com>
JoelAtDeluxe
left a comment
There was a problem hiding this comment.
Sorry for the long, long time it took to get through this.
Overall, this looks fine. I think we can improve the add users to group query, and the deleting users from group query (into, hopefully, a single query, or at worst a group of queries (select from users, then delete where in) ). Personally, I think it's also worth dropping the pagination support on the backend for groups, and maybe just doing front-end only pagination.
With those two queries (and optionally the pagination) fixed, I think we'd be in a good place to merge.
Co-authored-by: Joel Smith <joel.smith@originate.com>
Thanks for reviewing it Joel! No worries; it was pretty long 😬 I've modified both queries and am going to take a look at pagination right now! |
I've added a user group feature that allows system admins to create groups of users, and then system admins or operation admins can assign those groups to an operation. If a user is assigned to an operation via a group AND individually, the greater of the permission levels of the two will be granted.
Here's a video showing the system admin view:
https://user-images.githubusercontent.com/22867407/210581893-9ec21a42-ca37-4699-980c-82e93ac4e3dd.mov
Here's a video showing how to add a user via a group
https://user-images.githubusercontent.com/22867407/210582049-c0a6ac7f-77f9-422c-b097-237333ebcfb0.mov
Here's a video showing that the greater permission level is granted
https://user-images.githubusercontent.com/22867407/210582353-7758a9a4-82bd-4620-982e-14230b72cfbc.mov
I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.