From cdfcef04a1574941f056982018ed4435f017deef Mon Sep 17 00:00:00 2001 From: Unknwon Date: Tue, 3 Jan 2017 10:39:05 +0800 Subject: [PATCH] Fix incorrect logic check for fork repo action --- routers/repo/pull.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routers/repo/pull.go b/routers/repo/pull.go index 1348c7de6..b28dd591f 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -49,7 +49,8 @@ func getForkRepository(ctx *context.Context) *models.Repository { return nil } - if !forkRepo.CanBeForked() || !ctx.Repo.HasAccess() { + hasAccess, _ := models.HasAccess(ctx.User, forkRepo, models.ACCESS_MODE_READ) + if !hasAccess || !forkRepo.CanBeForked() { ctx.Handle(404, "getForkRepository", nil) return nil }