[3260] Add feature to manage partner users for a Partner as a Organization/Bank
Resolves #3260
Description
This PR adds a page to manage the users for a partner as an organization. This uses the roles!
A few additional things to change in an upcoming PR:
- Modify the user management flow to use this code as a partner. Right now there is a
Partner::UsersControllerwhich we can deprecate in favor of using common code. - In the update above, I would work in the ability to set the partner users as admins so they have the ability to add/remove and promote/demote users.
Type of change
- New feature (non-breaking change which adds functionality)
How Has This Been Tested?
Tested locally. Still need to add specs.
Screenshots
See for quick recording - https://jam.dev/c/9c61fa7a-ba15-415e-8568-aabd3e4171e3
@edwinthinks pushed the change - this is really just using plain old Rails forms. Everything seems to work fine. Not sure why the revoking logic doesn't work right now but this has to be rebased/merged off main anyway.
I merged in main and fixed conflicts.
Hey @edwinthinks -- IIRTC Looks like you've still got tests that call OrganizationController.invite_user, which you've deleted?
With this branch, I tried to invite myself as a bank user on my local
So I think there's still real work to be done on this.
@dorner @cielf finally got around to fixing it!
@dorner Given your level of busy, can I pass this off to @awwaiid for review instead of you? It looks like you were close to oking it before.
Not sure if [this comment](https://github.com/rubyforgood/human-essentials/pull/3266#discussion_r1267288892) was addressed. Otherwise I think it seems like the rest of them have.
@cielf fixed this up, it should be good to test out!
Finally! I'm not going to try to get it in for this weekend -- it's already pretty meaty -- but I will kick the tires.
@dorner From tonight's stakeholder meeting -- can we please limit access to this to org_admins ? Thanks.
The bug you found was because you were inviting a user that already existed in the system - and that user doesn't have an invitation_sent_at. Pretty sure this is a non-case in production.
Addressed other feedback!
The bug you found was because you were inviting a user that already existed in the system - and that user doesn't have an
invitation_sent_at. Pretty sure this is a non-case in production.
Probably -- we should address that in the seed (I'm making a note for a new issue around that), and I'll test the appropriate case with a newly invited user.
@awwaiid Can you take a look -- mostly as a formality -- @dorner took this over to get it to the finish line.
@cielf fixed!
The status on this is waiting for @awwaiid to take a look at it then.
@edwinthinks: Your PR [3260] Add feature to manage partner users for a Partner as a Organization/Bank is part of today's Human Essentials production release: 2024.06.23.
Thank you very much for your contribution!