mirror of
https://github.com/go-gitea/gitea
synced 2025-07-24 19:28:38 +00:00
fix bug when update owner team then visit team's repo return 404 (#6119)
This commit is contained in:
committed by
techknowlogick
parent
df30010dbd
commit
134e55510e
@@ -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 {
|
||||
|
Reference in New Issue
Block a user