Fix #9530: admin auth list make readable and admin auth delete bug fix (#9628)

tokarchuk/v1.17
Shashvat Kedia 5 years ago committed by zeripath
parent b9309e52f0
commit 1e9b3d4743
  1. 5
      cmd/admin.go

@ -155,6 +155,7 @@ var (
microcmdAuthDelete = cli.Command{ microcmdAuthDelete = cli.Command{
Name: "delete", Name: "delete",
Usage: "Delete specific auth source", Usage: "Delete specific auth source",
Flags: []cli.Flag{idFlag},
Action: runDeleteAuth, Action: runDeleteAuth,
} }
@ -533,9 +534,9 @@ func runListAuth(c *cli.Context) error {
// loop through each source and print // loop through each source and print
w := tabwriter.NewWriter(os.Stdout, 0, 0, 1, ' ', tabwriter.AlignRight) w := tabwriter.NewWriter(os.Stdout, 0, 0, 1, ' ', tabwriter.AlignRight)
fmt.Fprintf(w, "ID\tName\tType\tEnabled") fmt.Fprintf(w, "ID\tName\tType\tEnabled\n")
for _, source := range loginSources { for _, source := range loginSources {
fmt.Fprintf(w, "%d\t%s\t%s\t%t", source.ID, source.Name, models.LoginNames[source.Type], source.IsActived) fmt.Fprintf(w, "%d\t%s\t%s\t%t\n", source.ID, source.Name, models.LoginNames[source.Type], source.IsActived)
} }
w.Flush() w.Flush()

Loading…
Cancel
Save