mirror of
https://github.com/go-gitea/gitea
synced 2025-08-12 04:28:21 +00:00
Restricting access to fork functioanlity to users with Code access (#2542)
Signed-off-by: Jonas Franz <info@jonasfranz.software>
This commit is contained in:
committed by
Kim "BKC" Carlbäcker
parent
fc0c6f48c7
commit
91788e0200
@@ -416,8 +416,10 @@ func RegisterRoutes(m *macaron.Macaron) {
|
||||
m.Post("/create", bindIgnErr(auth.CreateRepoForm{}), repo.CreatePost)
|
||||
m.Get("/migrate", repo.Migrate)
|
||||
m.Post("/migrate", bindIgnErr(auth.MigrateRepoForm{}), repo.MigratePost)
|
||||
m.Combo("/fork/:repoid").Get(repo.Fork).
|
||||
Post(bindIgnErr(auth.CreateRepoForm{}), repo.ForkPost)
|
||||
m.Group("/fork", func() {
|
||||
m.Combo("/:repoid").Get(repo.Fork).
|
||||
Post(bindIgnErr(auth.CreateRepoForm{}), repo.ForkPost)
|
||||
}, context.RepoIDAssignment(), context.UnitTypes(), context.LoadRepoUnits(), context.CheckUnit(models.UnitTypeCode))
|
||||
}, reqSignIn)
|
||||
|
||||
m.Group("/:username/:reponame", func() {
|
||||
|
Reference in New Issue
Block a user