mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-22 21:49:22 +00:00
Correctly check http git access rights for reverse proxy authorized users (#3721)
This commit is contained in:
parent
4c6e170ceb
commit
ab5cc6f3a9
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue