summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/status.go
diff options
context:
space:
mode:
authorEthan Koenig <etk39@cornell.edu>2017-07-11 21:23:41 -0400
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-07-12 03:23:41 +0200
commit93a1de48428c2f89502cf6bba80f3976c6f5839f (patch)
tree8d08276df62513a32f0c0573b3e388bb823454ef /routers/api/v1/repo/status.go
parentda89afda58e18700ee49f955de3f33fdc591c239 (diff)
downloadgitea-93a1de48428c2f89502cf6bba80f3976c6f5839f.tar.gz
gitea-93a1de48428c2f89502cf6bba80f3976c6f5839f.zip
Fix repo API bug (#2133)
Don't require token when not necessary
Diffstat (limited to 'routers/api/v1/repo/status.go')
-rw-r--r--routers/api/v1/repo/status.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/routers/api/v1/repo/status.go b/routers/api/v1/repo/status.go
index d9b101df05..e4cc20a50b 100644
--- a/routers/api/v1/repo/status.go
+++ b/routers/api/v1/repo/status.go
@@ -103,15 +103,10 @@ func GetCombinedCommitStatus(ctx *context.APIContext) {
return
}
- acl, err := models.AccessLevel(ctx.User.ID, repo)
- if err != nil {
- ctx.Error(500, "AccessLevel", fmt.Errorf("AccessLevel[%d, %s]: %v", ctx.User.ID, repo.FullName(), err))
- return
- }
retStatus := &combinedCommitStatus{
SHA: sha,
TotalCount: len(statuses),
- Repo: repo.APIFormat(acl),
+ Repo: repo.APIFormat(ctx.Repo.AccessMode),
URL: "",
}