diff --git a/routers/repo/pull.go b/routers/repo/pull.go
index 5e51fda495..583f3b0a35 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
 	}