Auth: conflicting users validation improvements (#58136)

* WIP

* add: better validation of conflict file

* add: better description of validation and ingest command

* add: check for at least one user to delete

* add: example in terraform to setup for conflicts

* Update pkg/cmd/grafana-cli/commands/conflict_user_command.go

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>

* Add: print of conflict block for error

- adds conflict block to error output for validation of the file to
  easier diagnose in the file

* fix: formatting of errors

* fix: info strings improvements

* add: default 0 to blocks to check for users

* fixed: tests

* test integration

* fix strings fmt

* set store in resolver

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
This commit is contained in:
Eric Leijonmarck
2022-11-07 18:12:17 +00:00
committed by GitHub
parent 2027f4702c
commit 76947b10e2
4 changed files with 190 additions and 31 deletions

View File

@ -219,7 +219,7 @@ var adminCommands = []*cli.Command{
},
{
Name: "ingest-file",
Usage: "ingests the conflict users file",
Usage: "ingests the conflict users file. > Note: This is irreversible it will change the state of the database.",
Action: runIngestConflictUsersFile(),
},
},