Fix team permissions (#34827)

* Fix #34793
* Fix #33456
This commit is contained in:
wxiaoguang
2025-06-24 21:24:09 +08:00
committed by GitHub
parent a789a8cc7a
commit 6a97ab0af4
15 changed files with 163 additions and 52 deletions

View File

@ -602,8 +602,3 @@ func getUserTeamIDsQueryBuilder(orgID, userID int64) *builder.Builder {
"team_user.uid": userID,
})
}
// TeamsWithAccessToRepo returns all teams that have given access level to the repository.
func (org *Organization) TeamsWithAccessToRepo(ctx context.Context, repoID int64, mode perm.AccessMode) ([]*Team, error) {
return GetTeamsWithAccessToRepo(ctx, org.ID, repoID, mode)
}