mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-02 18:52:14 +00:00
This PR adds the `gitea admin user disable-2fa` command to disable 2FA for a user When the only admin in the instance loses their 2FA credentials, this command can be used to disable 2FA, allowing them to log in and reset it. --------- Co-authored-by: Giteabot <teabot@gitea.io>
25 lines
503 B
Go
25 lines
503 B
Go
// Copyright 2023 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package cmd
|
|
|
|
import (
|
|
"github.com/urfave/cli/v3"
|
|
)
|
|
|
|
func newUserCommand() *cli.Command {
|
|
return &cli.Command{
|
|
Name: "user",
|
|
Usage: "Modify users",
|
|
Commands: []*cli.Command{
|
|
microcmdUserCreate(),
|
|
newUserListCommand(),
|
|
microcmdUserChangePassword(),
|
|
microcmdUserDelete(),
|
|
newUserGenerateAccessTokenCommand(),
|
|
microcmdUserMustChangePassword(),
|
|
microcmdUserDisableTwoFactor(),
|
|
},
|
|
}
|
|
}
|