summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-09-05 14:31:52 -0400
committerUnknwon <u@gogs.io>2015-09-05 14:31:52 -0400
commit119dec51f2ed764d004d32a5fc3006870d81291f (patch)
treea5ffceb9f4e12ef348dad58d7463d1f6726bdaed /routers
parent46dce2d65311fa37f04acfb4516b0dcb8cfbde5c (diff)
downloadgitea-119dec51f2ed764d004d32a5fc3006870d81291f.tar.gz
gitea-119dec51f2ed764d004d32a5fc3006870d81291f.zip
Mirror repository should not allow fork
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/pull.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/routers/repo/pull.go b/routers/repo/pull.go
index 19f9f5b8e2..c1eec7cc2f 100644
--- a/routers/repo/pull.go
+++ b/routers/repo/pull.go
@@ -38,9 +38,8 @@ func getForkRepository(ctx *middleware.Context) *models.Repository {
return nil
}
- // Cannot fork bare repo.
- if forkRepo.IsBare {
- ctx.Handle(404, "", nil)
+ if !forkRepo.CanBeForked() {
+ ctx.Handle(404, "getForkRepository", nil)
return nil
}