Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cmd/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,12 @@ func runCreateUser(c *cli.Context) error {
changePassword = c.Bool("must-change-password")
}

// If this is the first user being created.
// Take it as the admin and don't force a password update.
if n := models.CountUsers(); n == 0 {
changePassword = false
}

if err := models.CreateUser(&models.User{
Name: c.String("name"),
Email: c.String("email"),
Expand Down