diff options
Diffstat (limited to 'models/access.go')
-rw-r--r-- | models/access.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/models/access.go b/models/access.go index ea2f7f7b4b..dd856afb71 100644 --- a/models/access.go +++ b/models/access.go @@ -170,8 +170,13 @@ func (repo *Repository) recalculateTeamAccesses(e Engine, ignTeamID int64) (err if t.ID == ignTeamID { continue } + + // Owner team gets owner access, and skip for teams that do not + // have relations with repository. if t.IsOwnerTeam() { t.Authorize = ACCESS_MODE_OWNER + } else if !t.hasRepository(e, repo.Id) { + continue } if err = t.getMembers(e); err != nil { |