mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 07:02:12 +08:00
CLI: Add command to migrate all datasources to use encrypted password fields (#17118)
closes: #17107
This commit is contained in:

committed by
Carl Bergquist

parent
b9181df212
commit
151b24b95f
@ -6,13 +6,15 @@ import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/grafana/grafana/pkg/bus"
|
||||
"github.com/grafana/grafana/pkg/cmd/grafana-cli/logger"
|
||||
"github.com/grafana/grafana/pkg/cmd/grafana-cli/utils"
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
"github.com/grafana/grafana/pkg/services/sqlstore"
|
||||
"github.com/grafana/grafana/pkg/util"
|
||||
)
|
||||
|
||||
const AdminUserId = 1
|
||||
|
||||
func resetPasswordCommand(c CommandLine) error {
|
||||
func resetPasswordCommand(c utils.CommandLine, sqlStore *sqlstore.SqlStore) error {
|
||||
newPassword := c.Args().First()
|
||||
|
||||
password := models.Password(newPassword)
|
||||
|
Reference in New Issue
Block a user