Load a set of predefined labels (#3459)

* Can use a predefined set of labels

* Change UI

* Fix HTML file indentation

* Avoid reading file from other directory (security issue)

* Apply a better fix

* Remove not used variable

* Merge upstream/develop

* Do modifications

* Raname

* remove binding + rename variable
This commit is contained in:
Thibault Meyer 2016-08-30 04:02:49 +02:00 committed by 无闻
parent 9f44c26789
commit 92fb30c526
8 changed files with 841 additions and 925 deletions

View file

@ -477,6 +477,7 @@ func runWeb(ctx *cli.Context) error {
m.Post("/new", bindIgnErr(auth.CreateLabelForm{}), repo.NewLabel)
m.Post("/edit", bindIgnErr(auth.CreateLabelForm{}), repo.UpdateLabel)
m.Post("/delete", repo.DeleteLabel)
m.Post("/initialize", bindIgnErr(auth.InitializeLabelsForm{}), repo.InitializeLabels)
}, repo.MustEnableIssues, reqRepoWriter, context.RepoRef())
m.Group("/milestones", func() {
m.Combo("/new").Get(repo.NewMilestone).