#1206 does not allow fork bare repo
This commit is contained in:
parent
398569f6f8
commit
670ade9a61
3 changed files with 12 additions and 1 deletions
|
@ -33,6 +33,13 @@ func getForkRepository(ctx *middleware.Context) *models.Repository {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Cannot fork bare repo.
|
||||
if forkRepo.IsBare {
|
||||
ctx.Handle(404, "", nil)
|
||||
return nil
|
||||
}
|
||||
|
||||
ctx.Data["repo_name"] = forkRepo.Name
|
||||
ctx.Data["desc"] = forkRepo.Description
|
||||
ctx.Data["IsPrivate"] = forkRepo.IsPrivate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue