aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-06-21 14:01:44 +0100
committerGitHub <noreply@github.com>2021-06-21 14:01:44 +0100
commit681e81babdbbe777b3ea2af353b872aee2dd9b32 (patch)
tree2987629e07fccd4a046626387ead70d2dee74b9f /routers/api
parent4fcae3d06d1099ade682df96e41baf4f5ac56620 (diff)
downloadgitea-681e81babdbbe777b3ea2af353b872aee2dd9b32.tar.gz
gitea-681e81babdbbe777b3ea2af353b872aee2dd9b32.zip
reqOrgMembership calls need to be preceded by reqToken (#16198)
ReqOrgMembership calls need to be preceded by reqToken Fix #16192 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'routers/api')
-rw-r--r--routers/api/v1/api.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index 34cf80e072..9efc2af244 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -989,10 +989,10 @@ func Routes() *web.Route {
Delete(reqToken(), reqOrgMembership(), org.ConcealMember)
})
m.Group("/teams", func() {
- m.Combo("", reqToken()).Get(org.ListTeams).
- Post(reqOrgOwnership(), bind(api.CreateTeamOption{}), org.CreateTeam)
+ m.Get("", org.ListTeams)
+ m.Post("", reqOrgOwnership(), bind(api.CreateTeamOption{}), org.CreateTeam)
m.Get("/search", org.SearchTeam)
- }, reqOrgMembership())
+ }, reqToken(), reqOrgMembership())
m.Group("/labels", func() {
m.Get("", org.ListLabels)
m.Post("", reqToken(), reqOrgOwnership(), bind(api.CreateLabelOption{}), org.CreateLabel)