1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Merge pull request #2663 from Download-Fritz/MirrorForks

#2505 Allow to fork and disallow to create PRs for mirrors.
This commit is contained in:
Unknwon
2016-02-19 15:04:50 -05:00
6 changed files with 28 additions and 16 deletions

View File

@@ -470,7 +470,7 @@ func runWeb(ctx *cli.Context) {
m.Post("/delete", repo.DeleteRelease)
}, reqRepoAdmin, middleware.RepoRef())
m.Combo("/compare/*", repo.MustEnablePulls).Get(repo.CompareAndPullRequest).
m.Combo("/compare/*", repo.MustAllowPulls).Get(repo.CompareAndPullRequest).
Post(bindIgnErr(auth.CreateIssueForm{}), repo.CompareAndPullRequestPost)
}, reqSignIn, middleware.RepoAssignment(), repo.MustBeNotBare)
@@ -503,7 +503,7 @@ func runWeb(ctx *cli.Context) {
m.Get("/commits", middleware.RepoRef(), repo.ViewPullCommits)
m.Get("/files", middleware.RepoRef(), repo.ViewPullFiles)
m.Post("/merge", reqRepoAdmin, repo.MergePullRequest)
}, repo.MustEnablePulls)
}, repo.MustAllowPulls)
m.Group("", func() {
m.Get("/src/*", repo.Home)