-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed as not planned
Labels
Description
v2023.4.1, docker-compose
I have the following policy attached to my user write stage:
if "email" in request.context.get("prompt_data", {}):
# Fetch a user with the same email as the new user being enrolled
existing_user = ak_user_by(email=request.context["prompt_data"]["email"])
# If a user with the same email address exists, show a message and deny access
if existing_user:
ak_message("An account with this email address already exists. Please use a different email address.")
return False
# If the email is unique or 'email' is not in prompt_data context, allow the access
return TrueThat is supposed to show the message in ak_message when the policy fails. Though, it is not sending my message but a generic Failed to save user
Reactions are currently unavailable