diff options
author | Unknwon <u@gogs.io> | 2017-01-03 10:39:05 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-01-03 10:39:05 +0800 |
commit | cdfcef04a1574941f056982018ed4435f017deef (patch) | |
tree | b3cb7a457fcd66baa3b9cbe712e770bb0df077e8 | |
parent | 8aa35577b3267d6d23cfe2fbda180b1c53da5881 (diff) |
Fix incorrect logic check for fork repo action
-rw-r--r-- | routers/repo/pull.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/repo/pull.go b/routers/repo/pull.go index 1348c7de..b28dd591 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -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 } |