Fix incorrect logic check for fork repo action

pull/3996/head
Unknwon 2017-01-03 10:39:05 +08:00
parent 8aa35577b3
commit cdfcef04a1
No known key found for this signature in database
GPG Key ID: 7A02C406FAC875A2
1 changed files with 2 additions and 1 deletions

View File

@ -49,7 +49,8 @@ func getForkRepository(ctx *context.Context) *models.Repository {
return nil
}
if !forkRepo.CanBeForked() || !ctx.Repo.HasAccess() {
hasAccess, _ := models.HasAccess(ctx.User, forkRepo, models.ACCESS_MODE_READ)
if !hasAccess || !forkRepo.CanBeForked() {
ctx.Handle(404, "getForkRepository", nil)
return nil
}