fix(cli): admin user create first user never require a password change

Fixes: https://codeberg.org/forgejo/forgejo/issues/3399
This commit is contained in:
Earl Warren 2024-04-24 12:27:20 +02:00
parent b9424e634f
commit ec334239e0
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 2 additions and 1 deletions

View file

@ -124,7 +124,7 @@ func runCreateUser(c *cli.Context) error {
if err != nil {
return fmt.Errorf("IsTableNotEmpty: %w", err)
}
if !hasUserRecord && isAdmin {
if !hasUserRecord {
// if this is the first admin being created, don't force to change password (keep the old behavior)
mustChangePassword = false
}