Skip to content

Commit

Permalink
Add a note for not passing userContext in user get API
Browse files Browse the repository at this point in the history
  • Loading branch information
deepjyoti30-st committed Sep 25, 2024
1 parent cfe3b0d commit ecd6508
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions recipe/dashboard/api/usersGet.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ func UsersGet(apiImplementation dashboardmodels.APIInterface, tenantId string, o
User map[string]interface{} `json:"user"`
}) {
defer processingGroup.Done()

// NOTE: If userContext is passed in the following call, it could
// possibly lead to a concurrent map write error so it's important
// to be careful while adding that.
userMetadataResponse, err := usermetadata.GetUserMetadata(userObj.User["id"].(string))
<-sem
if err != nil {
Expand Down

0 comments on commit ecd6508

Please sign in to comment.