mirror of
https://github.com/go-gitea/gitea
synced 2024-11-11 04:21:21 +01:00
Backport #31923 by @lunny Fix #20658 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
b140f647fc
commit
1d98d4e69a
1 changed files with 6 additions and 1 deletions
|
@ -879,10 +879,15 @@ func registerRoutes(m *web.Route) {
|
||||||
m.Post("/teams/{team}/action/repo/{action}", org.TeamsRepoAction)
|
m.Post("/teams/{team}/action/repo/{action}", org.TeamsRepoAction)
|
||||||
}, context.OrgAssignment(true, false, true))
|
}, 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.Group("/{org}", func() {
|
||||||
m.Get("/teams/new", org.NewTeam)
|
m.Get("/teams/new", org.NewTeam)
|
||||||
m.Post("/teams/new", web.Bind(forms.CreateTeamForm{}), org.NewTeamPost)
|
m.Post("/teams/new", web.Bind(forms.CreateTeamForm{}), org.NewTeamPost)
|
||||||
m.Get("/teams/-/search", org.SearchTeam)
|
|
||||||
m.Get("/teams/{team}/edit", org.EditTeam)
|
m.Get("/teams/{team}/edit", org.EditTeam)
|
||||||
m.Post("/teams/{team}/edit", web.Bind(forms.CreateTeamForm{}), org.EditTeamPost)
|
m.Post("/teams/{team}/edit", web.Bind(forms.CreateTeamForm{}), org.EditTeamPost)
|
||||||
m.Post("/teams/{team}/delete", org.DeleteTeam)
|
m.Post("/teams/{team}/delete", org.DeleteTeam)
|
||||||
|
|
Loading…
Reference in a new issue