feat: assign users to teams via OIDC claims #1393
|
@ -277,7 +277,7 @@ func AssignOrCreateUserToTeams(s *xorm.Session, u *user.User, teamData []models.
|
|||
if !exists {
|
||||
err = tm.Create(s, u)
|
||||
if err != nil {
|
||||
log.Errorf("Could not assign %v to %v. %v", u.Username, team.Name, err)
|
||||
log.Errorf("Could not assign user %s to team %s: %v", u.Username, team.Name, err)
|
||||
}
|
||||
}
|
||||
oidcTeams = append(oidcTeams, team.ID)
|
||||
|
@ -374,7 +374,7 @@ func GetOrCreateTeamsByOIDCAndNames(s *xorm.Session, teamData []models.OIDCTeamD
|
|||
te = append(te, newTeam)
|
||||
} else {
|
||||
log.Debugf("Team with oidc_id %v and name %v already exists.", team.OidcID, team.Name)
|
||||
te = append(te, &team)
|
||||
te = append(te, team)
|
||||
}
|
||||
}
|
||||
return te, err
|
||||
|
|
Loading…
Reference in New Issue
Block a user