add functionality to assign user to teams through oidc custom claim

This commit is contained in:
viehlieb 2023-01-27 13:49:19 +01:00 committed by kolaente
parent 905df6ebc0
commit ac032400d6
Signed by: konrad
GPG Key ID: F40E70337AB24C9B

View File

@ -228,6 +228,7 @@ func HandleCallback(c echo.Context) error {
log.Errorf("Found Error while signing out from teams %v", err)
}
}
err = s.Commit()
if err != nil {
_ = s.Rollback()
@ -347,7 +348,9 @@ func GetOrCreateTeamsByOIDCAndNames(s *xorm.Session, teamData []models.OIDCTeamD
log.Debugf("Team with oidc_id %v and name %v already exists.", team.OidcID, team.Name)
te = append(te, &team)
}
}
log.Debugf("Array: %v", te)
return te, err
}