fix admin lost permission caused by #947

This commit is contained in:
Lunny Xiao committed 2017-05-19 08:59:26 +08:00
1 parent 25d6e2a660
commit 6362462da8
4 files changed
+14 -9

No files matched your search

+1 -1
View File
@@ -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