]> source.dussan.org Git - gitea.git/commitdiff
Fix #9530: admin auth list make readable and admin auth delete bug fix (#9628)
authorShashvat Kedia <shashvat51@gmail.com>
Tue, 7 Jan 2020 23:41:16 +0000 (05:11 +0530)
committerzeripath <art27@cantab.net>
Tue, 7 Jan 2020 23:41:16 +0000 (23:41 +0000)
cmd/admin.go

index cd083a29e89cb88137cd6a42ed723b35c89ebefd..0b9f6eac441be03f39515df0b6478d9523c06550 100644 (file)
@@ -155,6 +155,7 @@ var (
        microcmdAuthDelete = cli.Command{
                Name:   "delete",
                Usage:  "Delete specific auth source",
+               Flags:  []cli.Flag{idFlag},
                Action: runDeleteAuth,
        }
 
@@ -533,9 +534,9 @@ func runListAuth(c *cli.Context) error {
 
        // loop through each source and print
        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 {
-               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()