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 "user list" subcommand to mmctl #12965

Closed
mattermod opened this issue Oct 29, 2019 · 4 comments · Fixed by mattermost/mmctl#34
Closed

Add "user list" subcommand to mmctl #12965

mattermod opened this issue Oct 29, 2019 · 4 comments · Fixed by mattermost/mmctl#34
Assignees
Labels

Comments

@mattermod
Copy link
Contributor

This ticket includes the addition of a “mmctl user list” command. This command should list the users of the server, and it should leverage the Get Users API endpoint.

The endpoint accepts multiple filters, so the command should implement at least the “in team” and “in channel” ones.

Link to mmctl repository.

If you have questions about the ticket or you need any help, feel free to contact miguel.delacruz in https://community.mattermost.com/


If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.

JIRA: https://mattermost.atlassian.net/browse/MM-19066

@njkevlani
Copy link
Contributor

@mgdelacroix

I'd like to take this issue.

Shouldn't this issue be opened in mmctl repository?
Some code pointers would be nice :)

@mgdelacroix
Copy link
Member

Sure @njkevlani, thanks for working on this! 🎉

Shouldn't this issue be opened in mmctl repository?

We use the mattermost-server repository to centralise all issues and contributions.

Some code pointers would be nice :)

The user commands live in the commands/user.go file, you can take inspiration on the user search command as the dynamics will be similar. You have to use the client driver to communicate with the API.

If you want to discuss this further, feel free to contact me in the community server, my username is miguel.delacruz.

@njkevlani
Copy link
Contributor

While running mmctl user list, what is expected output? What information should be printed?

Some options:

  1. Just print email IDs. Other things like Format of output, Filters can be implemented on later stage.
  2. Print output similar of mmctl user search njkevlani

@njkevlani
Copy link
Contributor

getUsers method in client4 fetches users in chunks (using page and perPage)
How should this new command mmctl user list fetch user list?

Some options:

  1. Using this existing getUsers function in client4 and fetch in chunk?
  2. Using a new method that fetches all users in one go?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants