Skip to content

Commit

Permalink
fix looking at the token not the config
Browse files Browse the repository at this point in the history
  • Loading branch information
saul-data committed Aug 30, 2024
1 parent 3f84899 commit 2a47ed4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/mainapp/routes/apiroutes.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ func APIRoutes(app *fiber.App) {
roleValues := strings.Split(dpconfig.OIDCClaimRoleValues, ",")

// if empty then error
if len(roleValues) < 1 {
if len(stringRoles) < 1 {
return c.Status(http.StatusUnauthorized).JSON(fiber.Map{
"Data Platform": "Dataplane",
"Error": "Role values not set.",
"Error": "Role values in token not set.",
})
}

Expand Down

0 comments on commit 2a47ed4

Please sign in to comment.