From 6362462da8958980385aad7c8df503d90e13380d Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 19 May 2017 08:59:26 +0800 Subject: fix admin lost permission caused by #947 --- routers/repo/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routers/repo/http.go') diff --git a/routers/repo/http.go b/routers/repo/http.go index b1c7cbbdb8..0bea513eff 100644 --- a/routers/repo/http.go +++ b/routers/repo/http.go @@ -206,7 +206,7 @@ func HTTP(ctx *context.Context) { } } - if !repo.CheckUnitUser(authUser.ID, unitType) { + if !repo.CheckUnitUser(authUser.ID, authUser.IsAdmin, unitType) { ctx.HandleText(http.StatusForbidden, fmt.Sprintf("User %s does not have allowed access to repository %s 's code", authUser.Name, repo.RepoPath())) return -- cgit v1.2.3