mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-10-25 03:57:13 +08:00
fix admin lost permission caused by #947
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user