Skip to content

website/docs: update unique email policy#19305

Merged
dewi-tik merged 3 commits intomainfrom
website/docs--update-unique-email-expression-policy
Jan 12, 2026
Merged

website/docs: update unique email policy#19305
dewi-tik merged 3 commits intomainfrom
website/docs--update-unique-email-expression-policy

Conversation

@dewi-tik
Copy link
Contributor

@dewi-tik dewi-tik commented Jan 9, 2026

Details

Closes #19304


Checklist

If applicable

  • The documentation has been updated
  • The documentation has been formatted (make docs)

@dewi-tik dewi-tik requested a review from a team as a code owner January 9, 2026 14:44
@dewi-tik dewi-tik self-assigned this Jan 9, 2026
@dewi-tik dewi-tik added area:docs Features or issues related to Docusaurus backport/version-2025.12 Add this label to PRs to backport changes to version-2025.12 labels Jan 9, 2026
@dewi-tik dewi-tik moved this from Todo to Needs review in authentik Core Jan 9, 2026
@dewi-tik dewi-tik requested a review from dominic-r January 9, 2026 14:45
@netlify
Copy link

netlify bot commented Jan 9, 2026

Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit 71a70f4
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6964fa66763b96000889366e
😎 Deploy Preview https://deploy-preview-19305--authentik-integrations.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Jan 9, 2026

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 71a70f4
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6964fa66c2e44100080a399a
😎 Deploy Preview https://deploy-preview-19305--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could be problematic in a registration context when there's no existing user? potentially

@codecov
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.35%. Comparing base (caa4826) to head (71a70f4).
⚠️ Report is 13 commits behind head on main.
✅ All tests successful. No failed tests found.

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     
Flag Coverage Δ
conformance 38.78% <ø> (+<0.01%) ⬆️
e2e 44.70% <ø> (+1.31%) ⬆️
integration 23.42% <ø> (+<0.01%) ⬆️
unit 91.56% <ø> (+<0.01%) ⬆️
unit-migrate 91.61% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@dominic-r dominic-r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 True

Any 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 True

cc @BeryJu

@github-project-automation github-project-automation bot moved this from Needs review to In Progress in authentik Core Jan 9, 2026
dewi-tik and others added 2 commits January 9, 2026 15:00
Signed-off-by: Dewi Roberts <dewi@goauthentik.io>
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
@BeryJu
Copy link
Member

BeryJu commented Jan 12, 2026

@dominic-r updated the policy

@netlify
Copy link

netlify bot commented Jan 12, 2026

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 71a70f4
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6964fa6674fd9b000832233f
😎 Deploy Preview https://deploy-preview-19305--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@dewi-tik dewi-tik enabled auto-merge (squash) January 12, 2026 14:12
@dewi-tik dewi-tik merged commit c848a01 into main Jan 12, 2026
100 checks passed
@dewi-tik dewi-tik deleted the website/docs--update-unique-email-expression-policy branch January 12, 2026 14:18
@github-project-automation github-project-automation bot moved this from In Progress to Done in authentik Core Jan 12, 2026
authentik-automation bot pushed a commit that referenced this pull request Jan 12, 2026
* 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>
@authentik-automation
Copy link
Contributor

🍒 Cherry-pick to version-2025.12 created: #19339

@github-actions
Copy link
Contributor

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

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)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

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-71a70f49bda55e0985c880ae24edb1f3c08ad0ba

Afterwards, run the upgrade commands from the latest release notes.

BeryJu added a commit that referenced this pull request Jan 12, 2026
…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>
kensternberg-authentik added a commit that referenced this pull request Jan 12, 2026
* 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs Features or issues related to Docusaurus backport/version-2025.12 Add this label to PRs to backport changes to version-2025.12

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Ensure unique email addresses script improvement

3 participants