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

User invite duplication and broken errors #8692

Closed
JohnONolan opened this issue Jul 14, 2017 · 10 comments
Closed

User invite duplication and broken errors #8692

JohnONolan opened this issue Jul 14, 2017 · 10 comments
Assignees
Labels
affects:admin Anything relating to Ghost Admin bug [triage] something behaving unexpectedly server / core Issues relating to the server or core of Ghost

Comments

@JohnONolan
Copy link
Member

It turns out you can invite a user email address that already has an account (this should not be possible) - and if you do, then they get this really ugly error when they try to accept the invitation (there should be an english error here, in case a user tries to manually put in an email address which already exists):

image

@JohnONolan JohnONolan added the bug [triage] something behaving unexpectedly label Jul 14, 2017
@kirrg001 kirrg001 added the server / core Issues relating to the server or core of Ghost label Jul 14, 2017
@kirrg001 kirrg001 added the affects:admin Anything relating to Ghost Admin label Jul 14, 2017
kirrg001 added a commit to kirrg001/Ghost that referenced this issue Jul 14, 2017
refs TryGhost#8692

- protect invite endpoint
@kirrg001
Copy link
Contributor

Good catch 👍 This only happens on the invite screen for me. I've pushed a PR.

@kevinansfield The error handling need's improving, because no matter which error the api returns, the admin always shows:

Failed to send 1 invitation: katharina.irrgang@gmail.com. Please check your email configuration, see https://docs.ghost.org/v1.0.0/docs/mail-config for instructions

In my case, the API returned a validation error saying ValidationError: User is already registered.

@PaszaVonPomiot
Copy link

I couldn't invite user with the same email address from team menu.

@letsjustfixit
Copy link
Contributor

letsjustfixit commented Jul 14, 2017

try inviting a user other than your own : that worked out for me..

@PaszaVonPomiot
Copy link

PaszaVonPomiot commented Jul 14, 2017

It didn't work for me:
image

kevinansfield pushed a commit that referenced this issue Jul 18, 2017
refs #8692

- protect invite endpoint
kevinansfield added a commit to kevinansfield/Ghost-Admin that referenced this issue Jul 18, 2017
refs TryGhost/Ghost#8692
- fixes the guard on setup/three against inviting the owner user set up on setup/two (we were sending invites for every e-mail in the list rather than only valid e-mails)
- adds a check to see if we get any invalid errors from the server and will show those separately to the `x emails failed to send` alert
@kevinansfield
Copy link
Member

With the server-side changes and the changes in TryGhost/Admin#786 I'm not sure what else is left to do here?

It would be useful to know how the duplicate user was created in the first place - as @kirrg001 mentioned the only place this should have been possible was inviting the owner user on the setup/three invite screen which should now be fixed. I've not been able to invite an existing or invited user via the team screen.

@ErisDS
Copy link
Member

ErisDS commented Jul 19, 2017

@kevinansfield to get exact steps you would need to ask @JohnONolan. However, I would guess at this happening after an import, inviting a user that was locked.

@JohnONolan
Copy link
Member Author

Yes it was after an import. I don't remember which order, actually, it could have been either:

or the other way around

@kirrg001
Copy link
Contributor

I am not able to reproduce this with latest master.

Closing - please re-open if you discover this again!

kevinansfield added a commit to kevinansfield/Ghost-Admin that referenced this issue Jul 20, 2017
refs TryGhost/Ghost#8692
- fixes the guard on setup/three against inviting the owner user set up
on setup/two (we were sending invites for every e-mail in the list
rather than only valid e-mails)
- adds a check to see if we get any invalid errors from the server and
will show those separately to the `x emails failed to send` alert
kirrg001 pushed a commit to TryGhost/Admin that referenced this issue Jul 20, 2017
refs TryGhost/Ghost#8692

- fixes the guard on setup/three against inviting the owner user set up
on setup/two (we were sending invites for every e-mail in the list
rather than only valid e-mails)
- adds a check to see if we get any invalid errors from the server and
will show those separately to the `x emails failed to send` alert
@JohnONolan
Copy link
Member Author

In RC1 I just successfully imported a user, who had a pending invitation to the blog - no duplicate entry detected.

image

Then when I clicked on the accept invitation link in the email, I got redirected to the login screen

The invitation still shows up in Ghost admin - but there is no way to accept it.

@JohnONolan JohnONolan reopened this Jul 20, 2017
@kevinansfield
Copy link
Member

@JohnONolan this has been resolved in master, the fix isn't in RC1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:admin Anything relating to Ghost Admin bug [triage] something behaving unexpectedly server / core Issues relating to the server or core of Ghost
Projects
None yet
Development

No branches or pull requests

6 participants