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

Allow the superuser to reinvite users

Open cielf opened this issue 8 months ago • 12 comments

Summary

There is no way to reinvite folks if already approved.

Why address?

This is really only a problem when a bank invites themself, but then doesn't accept the invitation. There is a workaround, but it is nasty and results in an extra partner.

Details

To see the screen involved, login in as [email protected] Click users Click All users

Add a "reinvite" button to the users in the superuser view. This will send out an appropriate invitation, according to the users highest role. (See other invitations in the system )

Criteria for completion

  • [ ] Changes as described
  • [ ] automated tests confirming the changes

cielf avatar Mar 30 '25 14:03 cielf

I would like to take this

Naraveni avatar Apr 01 '25 00:04 Naraveni

Please do

cielf avatar Apr 01 '25 02:04 cielf

@cielf if you dont mind me asking, how long till I can become a contributor for the human essentials. It just avoids me an extra step while updating branches and etc.

Thank You

Naraveni avatar Apr 02 '25 00:04 Naraveni

There really isn't a set time period -- every so often we include handling that sort of admin stuff in our planning meeting.

cielf avatar Apr 02 '25 16:04 cielf

@cielf @dorner

"This will send out an appropriate invitation, according to the users highest role. (See other invitations in the system )"

I saw that there is only one user inviting service where we can send a invite with all the roles the user need to be assigned.

  1. As the user already created and have multiple roles should I sent invite with highest role only? or include all roles.

Naraveni avatar Apr 03 '25 21:04 Naraveni

@naraveni Hmm -- so you're saying if someone is already a user with org_admin access, and they are added as a partner, they would get both invitations as it stands now?

cielf avatar Apr 04 '25 00:04 cielf

This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.

github-actions[bot] avatar May 05 '25 00:05 github-actions[bot]

Automatically unassigned after 7 days of inactivity.

github-actions[bot] avatar May 12 '25 00:05 github-actions[bot]

Hi @cielf I think I can handle this and I'm analyzing this case, but first I'd like to clarify a couple of questions:

  1. If the user doesn't have an invitation, it shouldn't appear, right?
  2. There are two types of reinvite buttons in the system:

2.1. Partner Agencies / All Partners Image

2.2. In My Organization / Users Image

Which of the two would I use as a reference?

rrg1459 avatar Jun 07 '25 13:06 rrg1459

Well, as far as appearance goes -- I think there's enough room to use the "Re-send invite" button style. For clarity, I believe there are differences in what happens on a re-invite between banks and partners (though I think the organization admin and organization users will be the same). So the mechanics behind the button may need to be different depending on the user's highest role.

cielf avatar Jun 07 '25 15:06 cielf

Could you give me a little more context?

From what I've reviewed, super_admin is the highest role, and I believe it has sufficient privileges to reinvite any user. Or, as you say, what happens when you reinvite a user? You should mention their role in the body of the email. Forgive my ignorance, but I'm slowly deciphering how Human Essentials works and I'm not sure if my question makes sense.

In any case, I believe (and please correct me if I'm wrong) that the new user invitation view can be reused.

Image

Or if you already have a subject and body for the re-invitation email, can you share it?

rrg1459 avatar Jun 09 '25 12:06 rrg1459

I'm pretty sure we don't change the text on a re-invite -- that it's literally just sending out the invitation again.

However the invitation is different for banks and for partners.

cielf avatar Jun 09 '25 19:06 cielf

Hey @rr1459 -- are you close to a solution with this? I ask because we have a support issue it would help with.

cielf avatar Jun 25 '25 15:06 cielf

Hi @cielf

Please assign it to me so I can upload the changes.

rrg1459 avatar Jun 26 '25 00:06 rrg1459

Hi @cielf I'm trying to upload my changes, but I'm getting this error.

Image

Should I fork the repository? Otherwise, I need access to push.

What do you think?

rrg1459 avatar Jun 27 '25 00:06 rrg1459

Yes -- you should fork the repository -- see the Code Contribution Workflow in https://github.com/rubyforgood/human-essentials/blob/main/CONTRIBUTING.md

cielf avatar Jun 27 '25 01:06 cielf

@cielf ready, for your review.

rrg1459 avatar Jun 28 '25 00:06 rrg1459

@rrg1459 Thanks. Might be Monday before I get to it.

cielf avatar Jun 28 '25 19:06 cielf

This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.

github-actions[bot] avatar Jul 29 '25 00:07 github-actions[bot]

Automatically unassigned after 7 days of inactivity.

github-actions[bot] avatar Aug 06 '25 00:08 github-actions[bot]

Hello @cielf , is this issue closed or can I try to work on it?

someykoku avatar Aug 12 '25 17:08 someykoku

I think it's been long enough since the last interaction on #5244 that you could take it over, but please read over what happened there. [shouting out to @rrg1459 in case they are still really working on it]

cielf avatar Aug 12 '25 23:08 cielf

hey @cielf, I am working on the issue. it took me a while to go through all the chat on the issue, but I think I got it now. Will give you an update soon.

someykoku avatar Aug 27 '25 15:08 someykoku

Hi @cielf,

I'm trying to help @someykoku through this request, but honestly I've lost the plot as to what still needs doing. There is various discussion between both the issue and the pull request, and for someone jumping in right now, I'm not sure where we are.

I appreciate that this is sucking up quite some resources on your side, but I'd really love it if we could specify what we actually want implemented at this stage. Then we can hopefully get it done and dusted pretty soon.

To my understanding, reinvite functionality works, but the email text differs depending on the user's role/relationship to organizations/partners.

Am I correct so far? If so: what should the email say, and what conditions should it say it in?

Thanks!

shkm avatar Sep 18 '25 10:09 shkm

@skhm I'll try to take a look tomorrow -- I think where we'd gotten was that what I was originally asking for was going to be more trouble than it's worth.

cielf avatar Sep 19 '25 02:09 cielf

@skhm Because any re-invite by the admin should be a rare, high-touch situation, and it was going to be a pain to implement, we stepped back from the "should match the highest role" requirement.

So, the invitation text on a reinvite should be the same as the invitation text on an initial invitation. It should match up with what we currently have on main.

Is that enough clarification?

cielf avatar Sep 19 '25 18:09 cielf