From c5b4572590be4bc348942756c8fdc66cc41996de Mon Sep 17 00:00:00 2001 From: Nemi Shah Date: Mon, 11 Sep 2023 19:30:26 +0530 Subject: [PATCH] Update to consume email from core response --- recipe/dashboard/recipeimplementation.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipe/dashboard/recipeimplementation.go b/recipe/dashboard/recipeimplementation.go index a7a846c6..380ba484 100644 --- a/recipe/dashboard/recipeimplementation.go +++ b/recipe/dashboard/recipeimplementation.go @@ -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"]