|
|
|
@ -883,10 +883,15 @@ func registerRoutes(m *web.Router) { |
|
|
|
|
m.Post("/teams/{team}/action/repo/{action}", org.TeamsRepoAction) |
|
|
|
|
}, context.OrgAssignment(true, false, true)) |
|
|
|
|
|
|
|
|
|
// require admin permission
|
|
|
|
|
m.Group("/{org}", func() { |
|
|
|
|
m.Get("/teams/-/search", org.SearchTeam) |
|
|
|
|
}, context.OrgAssignment(true, false, false, true)) |
|
|
|
|
|
|
|
|
|
// require owner permission
|
|
|
|
|
m.Group("/{org}", func() { |
|
|
|
|
m.Get("/teams/new", org.NewTeam) |
|
|
|
|
m.Post("/teams/new", web.Bind(forms.CreateTeamForm{}), org.NewTeamPost) |
|
|
|
|
m.Get("/teams/-/search", org.SearchTeam) |
|
|
|
|
m.Get("/teams/{team}/edit", org.EditTeam) |
|
|
|
|
m.Post("/teams/{team}/edit", web.Bind(forms.CreateTeamForm{}), org.EditTeamPost) |
|
|
|
|
m.Post("/teams/{team}/delete", org.DeleteTeam) |
|
|
|
|