summaryrefslogtreecommitdiffstats
path: root/routers/repo/editor.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/editor.go')
-rw-r--r--routers/repo/editor.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/routers/repo/editor.go b/routers/repo/editor.go
index 82c74ba75f..8d4f1f8827 100644
--- a/routers/repo/editor.go
+++ b/routers/repo/editor.go
@@ -36,12 +36,13 @@ const (
)
func renderCommitRights(ctx *context.Context) bool {
- canCommit, err := ctx.Repo.CanCommitToBranch(ctx.User)
+ canCommitToBranch, err := ctx.Repo.CanCommitToBranch(ctx.User)
if err != nil {
log.Error("CanCommitToBranch: %v", err)
}
- ctx.Data["CanCommitToBranch"] = canCommit
- return canCommit
+ ctx.Data["CanCommitToBranch"] = canCommitToBranch
+
+ return canCommitToBranch.CanCommitToBranch
}
// getParentTreeFields returns list of parent tree names and corresponding tree paths