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

add 'reset_password' arg to user resource #127

Merged
merged 5 commits into from
Nov 28, 2019

Conversation

UrosSimovic
Copy link
Contributor

No description provided.

@ghost ghost added the size/XS label May 6, 2019
@ghost ghost added the documentation label May 6, 2019
@roidelapluie
Copy link
Collaborator

Can we have "null" as default? so that it would be true on user creation.

@UrosSimovic
Copy link
Contributor Author

Can we have "null" as default? so that it would be true on user creation.

Sorry, but don't know what you mean with that.

@roidelapluie
Copy link
Collaborator

I would like that by default we do not change that option

@UrosSimovic
Copy link
Contributor Author

Please show me an example how/what to do.

Copy link
Collaborator

@jorcau jorcau left a comment

Choose a reason for hiding this comment

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

I guess @roidelapluie meant not to use a default since it's an optional parameter and let Gitlab handle it. In go-gitlab lib, it's an omitempty field (https://github.com/xanzy/go-gitlab/blob/master/users.go#L149).

Could you please add this parameter in the tests file so it's tested as well?

@UrosSimovic
Copy link
Contributor Author

I can remove default value. But wouldn't be a bit inconsistent at the end, if you look at is_external parameter, which is also optional and omitempty? I just copied is_external and renamed it.

@UrosSimovic
Copy link
Contributor Author

I removed default value, so after upgrading the provider there won't be state change.

Regarding tests, this field is somehow special, edge case. You can only set it on create, you can't update it, and you don't get it in response. So don't know what to test.

@matejvelikonja
Copy link
Contributor

@roidelapluie this cannot be tested

@roidelapluie
Copy link
Collaborator

Can we still add two tests: creating a user with and without that attribute ?

thanks

@roidelapluie
Copy link
Collaborator

even if we do not check the result because we can't

@Toady00
Copy link

Toady00 commented Oct 21, 2019

I was going to create an issue requesting this feature but I found this. Can I ask what the status is here? This feature would be really helpful. As of right now the only way we can get a new user into out Gitlab is to create a random password when creating the user, they then get an email, but they have to go through the forgotten password flow to login.

@roidelapluie
Copy link
Collaborator

we just need an acc test

@Toady00
Copy link

Toady00 commented Nov 11, 2019

@UrosSimovic is it possible to add the 2 tests that @roidelapluie requested so this can get merged? Just a creating a user with and without that attribute?

@ghost ghost added size/S and removed size/XS labels Nov 12, 2019
@UrosSimovic
Copy link
Contributor Author

Will this be ok? I added the test with reset_password = true attribute. Without attribute is already done.

@roidelapluie roidelapluie merged commit 9d41f2d into gitlabhq:master Nov 28, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

5 participants