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:
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user