Skip to content

Commit

Permalink
Merge pull request #10 from natrongmbh/disable-teams
Browse files Browse the repository at this point in the history
fix ghteams parsing
  • Loading branch information
janlauber authored Sep 1, 2022
2 parents 667bf79 + 6fc7925 commit b9feee5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/backend/controllers/authController.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,10 @@ func CheckAuth(c *fiber.Ctx) (models.GithubUser, error) {
}

var githubTeamSlugs []string
for _, githubTeam := range claims["github_team_slugs"].([]interface{}) {
githubTeamSlugs = append(githubTeamSlugs, githubTeam.(string))
if claims["github_team_slugs"] != nil {
for _, githubTeam := range claims["github_team_slugs"].([]interface{}) {
githubTeamSlugs = append(githubTeamSlugs, githubTeam.(string))
}
}

// return claims map as json
Expand Down

0 comments on commit b9feee5

Please sign in to comment.