Skip to content

Add create-user CLI command#1549

Merged
Eugeny merged 4 commits intowarp-tech:mainfrom
LarsSven:ls/create-on-recover
Oct 30, 2025
Merged

Add create-user CLI command#1549
Eugeny merged 4 commits intowarp-tech:mainfrom
LarsSven:ls/create-on-recover

Conversation

@LarsSven
Copy link
Copy Markdown
Contributor

Add a CLI command to create a user in warpgate. This command takes the following arguments:

  • Mandatory: username
  • Mandatory: password
  • Optional: role

This command is then also used by the setup command to simplify the setup command quite a lot (which is quite nice as the setup command is very large).

Our main use case is to create an admin user directly from the CLI, so we would use it like:

warpgate create-user admin warpgate:admin

I am not very familiar with rust so I may have made some supoptimal decisions around pass-by-value/cloning vs pass-by-reference, please let me know if that part especially looks reasonable.

Resolves #1505

@LarsSven
Copy link
Copy Markdown
Contributor Author

I'm not sure what to do with the failing CI job, it timed out it seems? Is it a flaky test?

@LarsSven
Copy link
Copy Markdown
Contributor Author

@Eugeny would you have time to review this?

@Eugeny
Copy link
Copy Markdown
Member

Eugeny commented Oct 30, 2025

Sorry for the delay - LGTM, I've changed the CLI interface to take --options and added an option to pass the password via an environment variable

@Eugeny Eugeny merged commit 8881f9e into warp-tech:main Oct 30, 2025
13 checks passed
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.

[Feature] Add support for setting an admin user without setup

2 participants