summaryrefslogtreecommitdiffstats
path: root/routers/repo/pull.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/pull.go')
-rw-r--r--routers/repo/pull.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/repo/pull.go b/routers/repo/pull.go
index a5eec2a5bd..c9d92297f6 100644
--- a/routers/repo/pull.go
+++ b/routers/repo/pull.go
@@ -490,7 +490,7 @@ func ParseCompareInfo(ctx *middleware.Context) (*models.User, *models.Repository
}
}
- if !ctx.User.CanWriteTo(headRepo) && !ctx.User.IsAdmin {
+ if !ctx.User.IsWriterOfRepo(headRepo) && !ctx.User.IsAdmin {
log.Trace("ParseCompareInfo[%d]: does not have write access or site admin", baseRepo.ID)
ctx.Handle(404, "ParseCompareInfo", nil)
return nil, nil, nil, nil, "", ""