diff options
author | Unknwon <u@gogs.io> | 2016-02-19 15:04:50 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-02-19 15:04:50 -0500 |
commit | 2408df3f3549bdddb16c7ce01e9cf5a2e18c0df5 (patch) | |
tree | a86642f774a8bd6a30ebc0b85575d2c1594c83b7 /routers | |
parent | 736a46dff96430f4ee43e6a2eb1bccbccaa611d4 (diff) | |
parent | a1b28fc33c4a685ffe9a07f67fa6786ec27524bb (diff) | |
download | gitea-2408df3f3549bdddb16c7ce01e9cf5a2e18c0df5.tar.gz gitea-2408df3f3549bdddb16c7ce01e9cf5a2e18c0df5.zip |
Merge pull request #2663 from Download-Fritz/MirrorForks
#2505 Allow to fork and disallow to create PRs for mirrors.
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/issue.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 635dee930e..400da72029 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -47,9 +47,9 @@ func MustEnableIssues(ctx *middleware.Context) { } } -func MustEnablePulls(ctx *middleware.Context) { - if !ctx.Repo.Repository.EnablePulls { - ctx.Handle(404, "MustEnablePulls", nil) +func MustAllowPulls(ctx *middleware.Context) { + if !ctx.Repo.Repository.AllowsPulls() { + ctx.Handle(404, "MustAllowPulls", nil) } ctx.Data["HasForkedRepo"] = ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID) @@ -71,7 +71,7 @@ func RetrieveLabels(ctx *middleware.Context) { func Issues(ctx *middleware.Context) { isPullList := ctx.Params(":type") == "pulls" if isPullList { - MustEnablePulls(ctx) + MustAllowPulls(ctx) if ctx.Written() { return } |