mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 04:12:10 +00:00
fix admin lost permission caused by #947
This commit is contained in:
parent
25d6e2a660
commit
6362462da8
4 changed files with 14 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue