Skip to content

Commit

Permalink
wip: add validation TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterlukasse committed Jan 23, 2024
1 parent 1836c2b commit 9ac8935
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions controllers/cohortdefinition.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func NewCohortDefinitionController(cohortDefinitionModel models.CohortDefinition
}

func (u CohortDefinitionController) RetriveById(c *gin.Context) {
// TODO - add teamproject validation - check if user has the necessary atlas and arborist permissions
cohortDefinitionId := c.Param("id")

if cohortDefinitionId != "" {
Expand All @@ -44,6 +45,7 @@ func (u CohortDefinitionController) RetriveStatsBySourceIdAndTeamProject(c *gin.
c.Abort()
return
}
// TODO - validate teamproject against arborist
if err1 == nil {
cohortDefinitionsAndStats, err := u.cohortDefinitionModel.GetAllCohortDefinitionsAndStatsOrderBySizeDesc(sourceId, teamProject)
if err != nil {
Expand Down

0 comments on commit 9ac8935

Please sign in to comment.