summaryrefslogtreecommitdiffstats
path: root/routers/repo
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2017-05-19 08:59:26 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2017-05-19 08:59:26 +0800
commit6362462da8958980385aad7c8df503d90e13380d (patch)
tree04b10fe28c10b1de457677ae35555cb91050b235 /routers/repo
parent25d6e2a6601f6a8ffd812db35da7692a82044a7f (diff)
downloadgitea-6362462da8958980385aad7c8df503d90e13380d.tar.gz
gitea-6362462da8958980385aad7c8df503d90e13380d.zip
fix admin lost permission caused by #947
Diffstat (limited to 'routers/repo')
-rw-r--r--routers/repo/http.go2
1 files changed, 1 insertions, 1 deletions
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