From a467184e13e4e3867031c191263dc0adaec2673c Mon Sep 17 00:00:00 2001 From: Download-Fritz Date: Fri, 19 Feb 2016 20:33:06 +0100 Subject: #2505 Allow to fork and disallow to create PRs for mirrors. --- routers/repo/issue.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'routers') diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 635dee930e..76822eb05e 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -48,7 +48,9 @@ func MustEnableIssues(ctx *middleware.Context) { } func MustEnablePulls(ctx *middleware.Context) { - if !ctx.Repo.Repository.EnablePulls { + if !ctx.Repo.Repository.CanEnablePulls() { + ctx.Handle(404, "Unsupported", nil) + } else if !ctx.Repo.Repository.EnablePulls { ctx.Handle(404, "MustEnablePulls", nil) } -- cgit v1.2.3