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

REST API to create user without invitation #3655

Closed
wants to merge 1 commit into from

Conversation

dairyo
Copy link
Contributor

@dairyo dairyo commented Mar 29, 2019

What type of PR is this? (check all applicable)

  • Feature

Description

I want to create a user without user invitation.

This is useful for systems using Redash as a part of it.
User verification is done in the systems.
Users must think that it is bother to do verification twice in a system.

Related Tickets & Documents

--

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

--

@rauchy
Copy link
Contributor

rauchy commented Mar 31, 2019

Thanks for contributing, @shinsuke-nara!

Could you elaborate on your use case that requires this?

Would POSTing to /users with the no_invite flag or using an SSO provider be sufficient?

@dairyo
Copy link
Contributor Author

dairyo commented Apr 1, 2019

@rauchy

Thank you for the comment.
I have been considering your advice.

I want to create an enabled users with easy way.

For no_invite flag, even though I create a user with no_invite flag, setting password via invitation page is required to enable the user. We can set password for the user with a path of invitation page included in response of user creation but two step user creation is troublesome. Recover process for two step user creation is more complex than one step user creation. For example, we may need to store failure reason to DB to recover it.

Using SSO is good but it is too much for me now.

Please tell me if you know an easy way to create enabled user.

@arikfr
Copy link
Member

arikfr commented Apr 2, 2019

For no_invite flag, even though I create a user with no_invite flag, setting password via invitation page is required to enable the user.

You can also set the password using an API call.

Using SSO is good but it is too much for me now.

There is the option of passing the user via a request header. I don't know how your setup looks like, but it might be an easy option to auto login your users.

This functionality is not going to be merged. If you still prefer to have a single API call, you're welcome to make a pull request which:

  1. Supports passing the password when calling POST /api/users.
  2. Now that a user can directly login, you need to mark the "invitation pending" flag when the user logins (if it's set to true).

This way you have a single step. Make sure to add tests to cover this new code.

Thanks!

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