diff --git a/routers/repo/pull.go b/routers/repo/pull.go index 5e51fda49..583f3b0a3 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -48,7 +48,7 @@ func getForkRepository(ctx *context.Context) *models.Repository { return nil } - if !forkRepo.CanBeForked() { + if !forkRepo.CanBeForked() || !forkRepo.HasAccess(ctx.User) { ctx.Handle(404, "getForkRepository", nil) return nil }