mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 02:08:36 +00:00
#1143 Team member access lost when adding repository collaborator
- fix bug when add a repo to team, all other team members gets access as well
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user