mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 22:12:42 +00:00
fix(cli): admin user create first user never require a password change
Fixes: https://codeberg.org/forgejo/forgejo/issues/3399
(cherry picked from commit ec334239e0
)
This commit is contained in:
parent
21a853aac7
commit
a1f29d9a0e
2 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue