Correctly check http git access rights for reverse proxy authorized users (#3721) (#3743)

This commit is contained in:
Lauris BH 2018-04-04 20:06:21 +03:00 committed by GitHub
parent 6c6d1ff08c
commit 641d481c38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -184,6 +184,7 @@ func HTTP(ctx *context.Context) {
return
}
}
}
if !isPublicPull {
has, err := models.HasAccess(authUser.ID, repo, accessMode)
@ -211,7 +212,6 @@ func HTTP(ctx *context.Context) {
return
}
}
}
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",