From 365809ff3466862bb70f660c71ca0c15ad49285a Mon Sep 17 00:00:00 2001 From: Marc 'risson' Schmitt Date: Wed, 27 Dec 2023 15:03:15 +0100 Subject: [PATCH] docs: remove imports Signed-off-by: Marc 'risson' Schmitt --- website/docs/flow/stages/password/index.md | 2 -- website/docs/flow/stages/user_write.md | 1 - 2 files changed, 3 deletions(-) diff --git a/website/docs/flow/stages/password/index.md b/website/docs/flow/stages/password/index.md index b893c2ac7..d0b84b3cb 100644 --- a/website/docs/flow/stages/password/index.md +++ b/website/docs/flow/stages/password/index.md @@ -13,14 +13,12 @@ Depending on what kind of device you want to require the user to have: #### WebAuthn ```python -from authentik.stages.authenticator_webauthn.models import WebAuthnDevice return WebAuthnDevice.objects.filter(user=request.context['pending_user'], confirmed=True).exists() ``` #### Duo ```python -from authentik.stages.authenticator_duo.models import DuoDevice return DuoDevice.objects.filter(user=request.context['pending_user'], confirmed=True).exists() ``` diff --git a/website/docs/flow/stages/user_write.md b/website/docs/flow/stages/user_write.md index 02ae9ce02..d10fa69d4 100644 --- a/website/docs/flow/stages/user_write.md +++ b/website/docs/flow/stages/user_write.md @@ -11,7 +11,6 @@ Newly created users can be created as inactive and can be assigned to a selected Starting with authentik 2022.5, users can be added to dynamic groups. To do so, simply set `groups` in the flow plan context before this stage is run, for example ```python -from authentik.core.models import Group group, _ = Group.objects.get_or_create(name="some-group") # ["groups"] *must* be set to an array of Group objects, names alone are not enough. request.context["flow_plan"].context["groups"] = [group]