Browse Source

Improve code for fix of #4006

pull/3996/head
Unknwon 8 years ago
parent
commit
e8c3e9bcf8
No known key found for this signature in database
GPG Key ID: 7A02C406FAC875A2
  1. 3
      routers/repo/pull.go

3
routers/repo/pull.go

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

Loading…
Cancel
Save