소스 검색

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

ᴊᴏᴇ ᴄʜᴇɴ 2 주 전
부모
커밋
ca59e76a53
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      internal/route/api/v1/api.go

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

@@ -282,7 +282,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() {