Browse Source

api: verify write access to update repo content (#8102)

ᴊᴏᴇ ᴄʜᴇɴ 2 weeks ago
parent
commit
9e70cdf437
1 changed files with 1 additions and 1 deletions
  1. 1 1
      internal/route/api/v1/api.go

+ 1 - 1
internal/route/api/v1/api.go

@@ -285,7 +285,7 @@ func RegisterRoutes(m *macaron.Macaron) {
 					m.Get("", repo.GetContents)
 					m.Combo("/*").
 						Get(repo.GetContents).
-						Put(bind(repo.PutContentsRequest{}), repo.PutContents)
+						Put(reqRepoWriter(), bind(repo.PutContentsRequest{}), repo.PutContents)
 				})
 				m.Get("/archive/*", repo.GetArchive)
 				m.Group("/git", func() {