scientist-softserv / atla-hyku

Other
0 stars 0 forks source link

Inviting existing users fails #170

Closed bkiahstroud closed 8 months ago

bkiahstroud commented 8 months ago

Ref

Story

Trying to add a user active in other repositories to another tenant does not return any error but does not add the user.

Changes proposed in this pull request:

Acceptance Criteria

Testing Instructions

  1. Login as a super admin
  2. Create a new tenant (e.g. Tenant A)
  3. Navigate to Tenant A > Dashboard > Manage Users
  4. Invite a new user who does not already exist in the application (i.e. across all tenants, not just one)
  5. Verify that the new user gets added to the Registered Users group in Tenant A
  6. Create a new tenant (e.g. Tenant B)
  7. Navigate to Tenant B > Dashboard > Manage Users
  8. Invite the same user from Step 4. Do not give it any individual roles in the invite form
  9. Verify that the user gets added to the Registered Users group in Tenant B

Notes

The primary issue here is that invited users who already have an account (i.e. an instance of User in the database) were not being added to the tenant's Registered Users group. This meant that, if a user was invited with no specific roles, they simply wouldn't show up in the tenant at all.