CLI: Remove manager-users conflict users cli (#95135)

* Remove conflict_user cli

* Delete pkg/build/cmd/exportversion.go
This commit is contained in:
Eric Leijonmarck
2024-11-04 09:38:08 +00:00
committed by GitHub
parent 986c024dd7
commit fe6ec1258f
4 changed files with 0 additions and 1887 deletions
-57
View File
@@ -167,63 +167,6 @@ var adminCommands = []*cli.Command{
},
},
},
{
Name: "user-manager",
Usage: "Runs different helpful user commands",
Subcommands: []*cli.Command{
// TODO: reset password for user
{
Name: "conflicts",
Usage: "runs a conflict resolution to find users with multiple entries",
CustomHelpTemplate: `
This command will find users with multiple entries in the database and try to resolve the conflicts.
explanation of each field:
explanation of each field:
* email - the user’s email
* login - the user’s login/username
* last_seen_at - the user’s last login
* auth_module - if the user was created/signed in using an authentication provider
* conflict_email - a boolean if we consider the email to be a conflict
* conflict_login - a boolean if we consider the login to be a conflict
# lists all the conflicting users
grafana-cli user-manager conflicts list
# creates a conflict patch file to edit
grafana-cli user-manager conflicts generate-file
# reads edited conflict patch file for validation
grafana-cli user-manager conflicts validate-file <filepath>
# validates and ingests edited patch file
grafana-cli user-manager conflicts ingest-file <filepath>
`,
Subcommands: []*cli.Command{
{
Name: "list",
Usage: "returns a list of users with more than one entry in the database",
Action: runListConflictUsers(),
},
{
Name: "generate-file",
Usage: "creates a conflict users file. Safe to execute multiple times.",
Action: runGenerateConflictUsersFile(),
},
{
Name: "validate-file",
Usage: "validates the conflict users file. Safe to execute multiple times.",
Action: runValidateConflictUsersFile(),
},
{
Name: "ingest-file",
Usage: "ingests the conflict users file. > Note: This is irreversible it will change the state of the database.",
Action: runIngestConflictUsersFile(),
},
},
},
},
},
}
var Commands = []*cli.Command{