stages/email: don't require pending user
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
parent
7df0e88b9d
commit
f05f440c78
|
@ -114,9 +114,10 @@ class EmailStageView(ChallengeStageView):
|
||||||
user.is_active = True
|
user.is_active = True
|
||||||
user.save()
|
user.save()
|
||||||
return self.executor.stage_ok()
|
return self.executor.stage_ok()
|
||||||
if PLAN_CONTEXT_PENDING_USER not in self.executor.plan.context:
|
if not user.is_authenticated:
|
||||||
self.logger.debug("No pending user")
|
# We'll only get here if there's no user in the flow plan context
|
||||||
messages.error(self.request, _("No pending user."))
|
# and no authenticated user either
|
||||||
|
self.logger.debug("Unauthenticated user", user=user)
|
||||||
return self.executor.stage_invalid()
|
return self.executor.stage_invalid()
|
||||||
# Check if we've already sent the initial e-mail
|
# Check if we've already sent the initial e-mail
|
||||||
if PLAN_CONTEXT_EMAIL_SENT not in self.executor.plan.context:
|
if PLAN_CONTEXT_EMAIL_SENT not in self.executor.plan.context:
|
||||||
|
|
Reference in a new issue