1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Mirror repository should not allow fork

This commit is contained in:
Unknwon
2015-09-05 14:31:52 -04:00
parent 46dce2d653
commit 119dec51f2
5 changed files with 9 additions and 6 deletions

View File

@@ -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
}