forked from forgejo/forgejo
Mirror repository should not allow fork
This commit is contained in:
parent
46dce2d653
commit
119dec51f2
5 changed files with 9 additions and 6 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue