website/docs: update unique email policy#19305
Conversation
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
|
||
| if other_user: | ||
| # Ensure that it is another user | ||
| if ( request.user.username != other_user.username): |
There was a problem hiding this comment.
this could be problematic in a registration context when there's no existing user? potentially
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #19305 +/- ##
==========================================
+ Coverage 93.12% 93.35% +0.23%
==========================================
Files 949 949
Lines 52419 52419
==========================================
+ Hits 48813 48935 +122
+ Misses 3606 3484 -122
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
dominic-r
left a comment
There was a problem hiding this comment.
For user registration, a user that dooesn't exist yet:
field_name = "email"
# Access to prompt data
prompt_data = request.context.get("prompt_data", {})
email = prompt_data.get(field_name)
if not email:
return True
# Check if email already exists
if ak_user_by(email__iexact=email):
ak_message("This email address is already in use")
return False
return TrueAny user updating their email address:
field_name = "email"
# Access to prompt data
prompt_data = request.context.get("prompt_data", {})
email = prompt_data.get(field_name)
if not email:
return True
existing_user = ak_user_by(email__iexact=email)
if existing_user:
# Get the pending user (the user being modified)
pending_user = request.context.get("pending_user")
# If a different user owns this email, deny
if not pending_user or existing_user.pk != pending_user.pk:
ak_message("This email address is already in use")
return False
return Truecc @BeryJu
Signed-off-by: Dewi Roberts <dewi@goauthentik.io>
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
|
@dominic-r updated the policy |
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
* Update doc * Update unique_email.md Signed-off-by: Dewi Roberts <dewi@goauthentik.io> * rewrite policy Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Dewi Roberts <dewi@goauthentik.io> Signed-off-by: Jens Langhammer <jens@goauthentik.io> Co-authored-by: Jens Langhammer <jens@goauthentik.io>
|
🍒 Cherry-pick to |
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-71a70f49bda55e0985c880ae24edb1f3c08ad0ba
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-71a70f49bda55e0985c880ae24edb1f3c08ad0baAfterwards, run the upgrade commands from the latest release notes. |
…on-2025.12) (#19339) website/docs: update unique email policy (#19305) * Update doc * Update unique_email.md * rewrite policy --------- Signed-off-by: Dewi Roberts <dewi@goauthentik.io> Signed-off-by: Jens Langhammer <jens@goauthentik.io> Co-authored-by: Dewi Roberts <dewi@goauthentik.io> Co-authored-by: Jens Langhammer <jens@goauthentik.io>
* main: website/docs: update unique email policy (#19305) core: bump library/nginx from `ca871a8` to `7272239` in /website (#19334) web: bump @types/node from 25.0.3 to 25.0.6 in /web (#19331) core: bump axllent/mailpit from v1.28.1 to v1.28.2 in /tests/e2e (#19329) web: bump knip from 5.80.1 to 5.80.2 in /web (#19332) web: bump pino from 10.1.0 to 10.1.1 in /web (#19333) website/docs: add flow import warnings (#19307) website/docs: Fix documentation example for `app_entitlements_attributes`. (#19316) website/docs: update m2m doc (#18963) website/docs: Fix typo in GitHub OAuth Source instructions (#18936) website/docs: deprecate GCDT auth stage (#19306) core, web: update translations (#19237)
Details
Closes #19304
Checklist
If applicable
make docs)