Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report]: Deleted org members cannot be reinvited to an org #2096

Open
BolajiOlajide opened this issue Jul 18, 2024 · 3 comments
Open

[Bug Report]: Deleted org members cannot be reinvited to an org #2096

BolajiOlajide opened this issue Jul 18, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@BolajiOlajide
Copy link
Contributor

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior:

  • a user’s invite has been accepted
  • their org member has been deleted
  • the user account is not deleted
    We won’t be able to re-invite the user again.

Expected behavior

if the invite and org member are both deleted and the user isn't deleted I should able to reinvite the user to the same org again

Screenshots

If applicable, could you add screenshots to help explain your problem?

Stack (please complete the following information):

  • Convoy: [e.g. v23.10.1]
  • PostgreSQL: [e.g. 15]
  • Redis: [e.g. 7.2]
  • OS: [e.g. Ubuntu 20.04.6 LTS]
  • Browser [e.g. stock browser, safari]

Additional context

Please feel free to add any other context about the problem here.

@BolajiOlajide BolajiOlajide added the bug Something isn't working label Jul 18, 2024
Copy link

linear bot commented Jul 18, 2024

@BolajiOlajide
Copy link
Contributor Author

Okay, this one is quite tricky for a couple of reasons. The bug is caused by a valid database constraint.

CleanShot 2024-07-22 at 23 06 09@2x

The organisation_invites_invitee_email constraint ensures we have invite per user for any given organization, however, this constraint doesn't take into consideration the status of the invite whether it has been accepted or otherwise.

My recommendation is to have this constraint removed, then have the check done in code where we just check if there's a record for organisation_members for that user that isn't deleted.

cc @jirevwe

@jirevwe
Copy link
Collaborator

jirevwe commented Jul 23, 2024

Hmm, alright.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants