1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-12 12:38:20 +00:00

fix bug when update owner team then visit team's repo return 404 (#6119) (#6166)

This commit is contained in:
Lunny Xiao
2019-02-23 11:55:32 +08:00
committed by techknowlogick
parent 12d883412f
commit 585dd13cce
3 changed files with 20 additions and 2 deletions

View File

@@ -151,6 +151,15 @@ func getUserRepoPermission(e Engine, repo *Repository, user *User) (perm Permiss
return
}
// if user in an owner team
for _, team := range teams {
if team.Authorize >= AccessModeOwner {
perm.AccessMode = AccessModeOwner
perm.UnitsMode = nil
return
}
}
for _, u := range repo.Units {
var found bool
for _, team := range teams {