Skip to content

Commit

Permalink
Update to consume email from core response
Browse files Browse the repository at this point in the history
  • Loading branch information
nkshah2 committed Sep 11, 2023
1 parent 95629ec commit c5b4572
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions recipe/dashboard/recipeimplementation.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ func makeRecipeImplementation(querier supertokens.Querier) dashboardmodels.Recip
return false, nil
}

// If the user has provided no admins, allow
if len(*admins) == 0 {
return true, nil
supertokens.LogDebugMessage("User Dashboard: Throwing OPERATION_NOT_ALLOWED because user is not an admin")
return false, errors.ForbiddenAccessError{
Msg: "You are not permitted to perform this operation",
}
}

userEmail, emailOk := verifyResponse["email"]
Expand Down

0 comments on commit c5b4572

Please sign in to comment.