mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +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:
parent
ab6b288141
commit
6f81c05dde
4 changed files with 20 additions and 4 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue