mirror of
https://github.com/grafana/grafana.git
synced 2025-09-28 03:53:50 +08:00
feat(grafana-cli): allow configuring admin ID for reset-admin-password (#60603)
* feat(grafana-cli): add a flag to control the admin user's ID for reset-admin-password Since this is now more permissive, I've also added validation that the requested user is an admin. * slight refactor to support testing
This commit is contained in:
@ -160,6 +160,11 @@ var adminCommands = []*cli.Command{
|
||||
Usage: "Read the password from stdin",
|
||||
Value: false,
|
||||
},
|
||||
&cli.IntFlag{
|
||||
Name: "user-id",
|
||||
Usage: "The admin user's ID",
|
||||
Value: DefaultAdminUserId,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user