Fix search team (#31923)
Fix #20658 (cherry picked from commit 06c67c6d5a91176fe4b87fc884c96afc7c3597fa)
This commit is contained in:
parent
1751825256
commit
4ee3a150a3
1 changed files with 6 additions and 1 deletions
|
@ -855,10 +855,15 @@ func registerRoutes(m *web.Route) {
|
|||
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)
|
||||
|
|
Loading…
Reference in a new issue