CLI: Add command to migrate all datasources to use encrypted password fields (#17118)

closes: #17107
(cherry picked from commit 151b24b95f)
This commit is contained in:
Andrej Ocenas
2019-05-27 14:30:34 +02:00
committed by Marcus Efraimsson
parent efd14ac7db
commit 7b0efb787b
14 changed files with 266 additions and 25 deletions
@@ -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)