human-essentials icon indicating copy to clipboard operation
human-essentials copied to clipboard

[3260] Add feature to manage partner users for a Partner as a Organization/Bank

Open edwinthinks opened this issue 3 years ago • 7 comments

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::UsersController which 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 avatar Nov 23 '22 20:11 edwinthinks

@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.

dorner avatar Feb 08 '23 00:02 dorner

I merged in main and fixed conflicts.

awwaiid avatar Feb 24 '23 00:02 awwaiid

Hey @edwinthinks -- IIRTC Looks like you've still got tests that call OrganizationController.invite_user, which you've deleted?

cielf avatar Apr 26 '23 15:04 cielf

With this branch, I tried to invite myself as a bank user on my local Screenshot 2023-06-08 at 8 06 33 PM

So I think there's still real work to be done on this.

cielf avatar Jun 09 '23 00:06 cielf

@dorner @cielf finally got around to fixing it!

edwinthinks avatar Jul 16 '23 16:07 edwinthinks

@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.

cielf avatar Nov 26 '23 17:11 cielf

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.

dorner avatar Nov 27 '23 19:11 dorner

@cielf fixed this up, it should be good to test out!

dorner avatar May 24 '24 20:05 dorner

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.

cielf avatar May 24 '24 21:05 cielf

@dorner From tonight's stakeholder meeting -- can we please limit access to this to org_admins ? Thanks.

cielf avatar Jun 05 '24 23:06 cielf

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.

dorner avatar Jun 07 '24 19:06 dorner

Addressed other feedback!

dorner avatar Jun 07 '24 20:06 dorner

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.

cielf avatar Jun 07 '24 20:06 cielf

@awwaiid Can you take a look -- mostly as a formality -- @dorner took this over to get it to the finish line.

cielf avatar Jun 08 '24 19:06 cielf

@cielf fixed!

dorner avatar Jun 14 '24 20:06 dorner

The status on this is waiting for @awwaiid to take a look at it then.

cielf avatar Jun 15 '24 01:06 cielf

@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!

github-actions[bot] avatar Jun 23 '24 14:06 github-actions[bot]