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

fix invitations of new users when mail is disabled #2773

Merged
merged 1 commit into from
Oct 19, 2022

Conversation

stefan0xC
Copy link
Contributor

@stefan0xC stefan0xC commented Sep 27, 2022

While testing locally (where I don't have mail enabled) I noticed that inviting a new user will save them as invited. Removing and inviting the same user again (or inviting them in a second organization) they will be listed as accepted instead. This should not happen, because until the user has actually created an account they cannot be confirmed yet (and without admin panel access you would not know when they have done so).

If you try to confirm an invitedaccepted but non-existing user you will be greeted with this error message:
client_error_1
(The error happens client side so there are no relevant server logs.)

Since registering an account automatically accepts the outstanding invitations for a user anyway, setting UserOrgStatus::Accepted can be limited to already registered users (when mail is disabled).

@stefan0xC stefan0xC changed the title fix invitations of new and existing users fix invitations of new users when mail is disabled Sep 28, 2022
Copy link
Collaborator

@BlackDex BlackDex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (Besides needing a re-base)

If you add a new user that has already been Invited to another
organization they will be Accepted automatically. This should not be
possible because they cannot be Confirmed until they have completed
their registration. It is also not necessary because their invitation
will be accepted automatically once they register.
@dani-garcia dani-garcia merged commit a540654 into dani-garcia:main Oct 19, 2022
@stefan0xC stefan0xC deleted the fix-invitation-of-new-users branch October 19, 2022 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants