Merge branch 'dev-ldap' into dev
This commit is contained in:
commit
d8136c9c3c
18 changed files with 614 additions and 24 deletions
11
cmd/web.go
11
cmd/web.go
|
@ -134,6 +134,7 @@ func runWeb(*cli.Context) {
|
|||
r.Get("/users", admin.Users)
|
||||
r.Get("/repos", admin.Repositories)
|
||||
r.Get("/config", admin.Config)
|
||||
r.Get("/auths", admin.Auths)
|
||||
}, adminReq)
|
||||
m.Group("/admin/users", func(r martini.Router) {
|
||||
r.Get("/new", admin.NewUser)
|
||||
|
@ -143,6 +144,14 @@ func runWeb(*cli.Context) {
|
|||
r.Get("/:userid/delete", admin.DeleteUser)
|
||||
}, adminReq)
|
||||
|
||||
m.Group("/admin/auths", func(r martini.Router) {
|
||||
r.Get("/new", admin.NewAuthSource)
|
||||
r.Post("/new", bindIgnErr(auth.AuthenticationForm{}), admin.NewAuthSourcePost)
|
||||
r.Get("/:authid", admin.EditAuthSource)
|
||||
r.Post("/:authid", bindIgnErr(auth.AuthenticationForm{}), admin.EditAuthSourcePost)
|
||||
r.Get("/:authid/delete", admin.DeleteAuthSource)
|
||||
}, adminReq)
|
||||
|
||||
if martini.Env == martini.Dev {
|
||||
m.Get("/template/**", dev.TemplatePreview)
|
||||
}
|
||||
|
@ -195,7 +204,7 @@ func runWeb(*cli.Context) {
|
|||
|
||||
protocol := base.Cfg.MustValue("server", "PROTOCOL", "http")
|
||||
listenAddr := fmt.Sprintf("%s:%s",
|
||||
base.Cfg.MustValue("server", "HTTP_ADDR"),
|
||||
base.Cfg.MustValue("server", "HTTP_ADDR", "0.0.0.0"),
|
||||
base.Cfg.MustValue("server", "HTTP_PORT", "3000"))
|
||||
|
||||
if protocol == "http" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue