aboutsummaryrefslogtreecommitdiff
path: root/routers
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-04-03 22:24:21 -0400
committerUnknwon <u@gogs.io>2017-04-03 22:24:21 -0400
commitb873ec2bcea6d7b6205925646275c27f7f157a93 (patch)
tree08c3551d2b0f715ca072b035a6690907e4e085b4 /routers
parent1bc805bb4b1f9d3afbbce357939b28594e372c58 (diff)
templates/repo/branches: hide pull request button if not allowed (#4377)
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/branch.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/repo/branch.go b/routers/repo/branch.go
index 08b1b068..d9a45fba 100644
--- a/routers/repo/branch.go
+++ b/routers/repo/branch.go
@@ -61,6 +61,7 @@ func loadBranches(ctx *context.Context) []*Branch {
}
}
+ ctx.Data["AllowPullRequest"] = ctx.Repo.Repository.AllowsPulls()
return branches
}