Skip to content

Commit

Permalink
vo implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioLangaritaBenitez committed Feb 24, 2025
1 parent 5a0ecd1 commit 3575556
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion pkg/handlers/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,25 @@ func MakeCreateHandler(cfg *types.Config, back types.ServerlessBackend) gin.Hand
}
} else {
if len(cfg.OIDCGroups) != 0 {
c.String(http.StatusBadRequest, fmt.Sprintln("service must be part of one of the following VO: ", cfg.OIDCGroups))
var notFound bool = true
for _, vo := range cfg.OIDCGroups {
service.VO = vo
err := checkIdentity(&service, cfg, authHeader)
fmt.Println(vo)
if err != nil {
fmt.Println(err)
c.String(http.StatusBadRequest, fmt.Sprintln(err))
//return
} else {
notFound = false
break
}
}
if notFound {
c.String(http.StatusBadRequest, fmt.Sprintln("service must be part of one of the following VO: ", cfg.OIDCGroups))
return
}

}
}

Expand Down

0 comments on commit 3575556

Please sign in to comment.