Skip to content

web/admin/bugfix: Edit Stage not working. Invoking IdentificationStageForm not working#20429

Merged
kensternberg-authentik merged 10 commits intomainfrom
web/fix/fix-broken-stage-edit
Feb 20, 2026
Merged

web/admin/bugfix: Edit Stage not working. Invoking IdentificationStageForm not working#20429
kensternberg-authentik merged 10 commits intomainfrom
web/fix/fix-broken-stage-edit

Conversation

@kensternberg-authentik
Copy link
Contributor

@kensternberg-authentik kensternberg-authentik commented Feb 19, 2026

What

  1. Fix the field being referenced by Flows -> [One Flow] -> StageBindings -> [Edit Stage] to use the PK for the stage, rather than the binding.
  2. Added a check in StrictUnsafe: if the property is “wrapped” and untyped, treat it as an attribute, not a property.
  3. Edit the ak-bound-stages-list target attribute to be an attribute, not a property.

Why

  1. This looks like a simple typo. To avoid this in the future, we need tests.
  2. ModelForm uses both a converter and get/set accessors to manage the pk (primary key) of the object it is being invoked to edit: the first because Django primary keys can be either strings or numbers, and the latter because we have special transactional requirements when a primary key changes. Lit’s magic for handling this creates some weirdness around JavaScript prototyping (wrapped becomes the only key on the object; all the other keys become delegated to a prototype object), so hasOwn() can’t be used; we just have to check for wrapped and !type.
  3. PKs are either strings or numbers, and ModelForm has a smart converter. There’s no need to shove the values around as properties and, in fact, that’ll break some things because there’s a working attribute field on ModelForm.pk! Removing the . property marker both avoids this issue and makes visible exactly what item-id is being referenced.
  • The code has been formatted (make web)

…eForm not working.

## What

1.  Fix the field being referenced by Flows -\> \[One Flow\] -\> StageBindings -\> \[Edit Stage\] to use the PK for the *stage*, rather than the *binding*.
2.  Added a check in `StrictUnsafe`: if the property is “wrapped” and untyped, treat it as an attribute, not a property.
3.  Edit the `ak-bound-stages-list` target attribute to be an attribute, not a property.

## Why

1.  This looks like a simple typo. To avoid this in the future, *we need tests*.
2.  `ModelForm` uses both a converter and get/set accessors to manage the pk (primary key) of the object it is being invoked to edit: the first because Django primary keys can be either strings or numbers, and the latter because we have special transactional requirements when a primary key changes. Lit’s magic for handling this creates some weirdness around JavaScript prototyping (`wrapped` becomes the only key on the object; all the other keys become delegated to a prototype object), so `hasOwn()` can’t be used; we just have to check for `wrapped` and `!type`.
3.  PKs are either strings or numbers, and ModelForm has a smart converter. There’s no need to shove the values around as properties and, in fact, that’ll break some things because there’s a working `attribute` field on ModelForm! Removing the `.` property marker both avoids this issue and makes visible exactly what item-id is being referenced.
@netlify
Copy link

netlify bot commented Feb 19, 2026

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 98a58d0
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6997954ffe576d00086e3111
😎 Deploy Preview https://deploy-preview-20429--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.

@netlify
Copy link

netlify bot commented Feb 19, 2026

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit bba9890
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/69988554ff386000087446fe
😎 Deploy Preview https://deploy-preview-20429--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.

${StrictUnsafe<CustomFormElementTagName>(item.stageObj?.component, {
slot: "form",
instancePk: item.pk,
instancePk: item.stageObj?.pk,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This looks like a simple typo. To avoid this in the future, we need tests.

<div class="pf-c-card">
<div class="pf-c-card__body">
<ak-bound-stages-list .target=${this.flow.pk}> </ak-bound-stages-list>
<ak-bound-stages-list target=${this.flow.pk}> </ak-bound-stages-list>
Copy link
Contributor Author

@kensternberg-authentik kensternberg-authentik Feb 19, 2026

Choose a reason for hiding this comment

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

PKs are either strings or numbers, and ModelForm has a smart converter. There's no need to shove the values around as properties and, in fact, that'll break some things because there's a working attribute field on ModelForm.pk! Removing the . property marker both avoids this issue and makes visible exactly what item-id is being referenced.

if ("wrapped" in propDeclaration && propDeclaration.wrapped && !propDeclaration.type) {
return Prefix.Attribute;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ModelForm uses both a converter and get/set accessors to manage the pk (primary key) of the object it is being invoked to edit: the first because Django primary keys can be either strings or numbers, and the latter because we have special transactional requirements when a primary key changes. Lit's magic for handling this creates some weirdness around JavaScript prototyping (wrapped becomes the only key on the object; all the other keys become delegated to a prototype object), so hasOwn() can't be used; we just have to check for wrapped and !type.

@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.27%. Comparing base (f56d3ab) to head (bba9890).
⚠️ Report is 35 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20429      +/-   ##
==========================================
+ Coverage   93.26%   93.27%   +0.01%     
==========================================
  Files         981      981              
  Lines       55161    55161              
==========================================
+ Hits        51448    51454       +6     
+ Misses       3713     3707       -6     
Flag Coverage Δ
conformance 37.45% <ø> (+<0.01%) ⬆️
e2e 43.27% <ø> (+<0.01%) ⬆️
integration 22.43% <ø> (+<0.01%) ⬆️
unit 91.50% <ø> (+<0.01%) ⬆️
unit-migrate 91.52% <ø> (+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.

@kensternberg-authentik kensternberg-authentik marked this pull request as ready for review February 19, 2026 21:28
@kensternberg-authentik kensternberg-authentik requested a review from a team as a code owner February 19, 2026 21:28
@netlify
Copy link

netlify bot commented Feb 19, 2026

Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit bba9890
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6998855406ea0200082744c0
😎 Deploy Preview https://deploy-preview-20429--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.

* main:
  website/docs: change permission name from 'Can view Admin interface' to 'Can access…' (#20412)
  website/integrations: add OIDC and update SAML instructions for Zammad (#20421)
@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-bba9890e169f20c03879aa68134f62cba7e78c66
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-bba9890e169f20c03879aa68134f62cba7e78c66

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

@kensternberg-authentik kensternberg-authentik merged commit ab981de into main Feb 20, 2026
145 of 148 checks passed
@kensternberg-authentik kensternberg-authentik deleted the web/fix/fix-broken-stage-edit branch February 20, 2026 16:44
kensternberg-authentik added a commit that referenced this pull request Feb 20, 2026
…ionship

* main:
  core: bump msgraph-sdk from 1.54.0 to 1.55.0 (#20432)
  core: bump aws-cdk-lib from 2.238.0 to 2.239.0 (#20434)
  core: bump constructs from 10.5.0 to 10.5.1 (#20433)
  core: bump goauthentik/fips-python from `c272691` to `d973c46` in /lifecycle/container (#20437)
  core: bump goauthentik/fips-debian from `b0917af` to `4419749` in /lifecycle/container (#20438)
  web/admin/bugfix: Edit Stage not working. Invoking IdentificationStageForm not working (#20429)
  core: bump ruff from 0.15.1 to 0.15.2 (#20435)
  enterprise/providers/microsoft_entra: only check upn when set (#20441)
  core: bump selenium from 4.40.0 to 4.41.0 (#20436)
  website/docs: change permission name from 'Can view Admin interface' to 'Can access…' (#20412)
  website/integrations: add OIDC and update SAML instructions for Zammad (#20421)
  website/integrations: update wazuh acs url (#20401)
  web: Center footer links. (#20345)
kensternberg-authentik added a commit that referenced this pull request Feb 21, 2026
* main: (29 commits)
  web/flow: refactor flow executor so component selection is in an easy-to-maintain table (#19999)
  website/integrations: gatus: fix config block  (#20446)
  core: bump msgraph-sdk from 1.54.0 to 1.55.0 (#20432)
  core: bump aws-cdk-lib from 2.238.0 to 2.239.0 (#20434)
  core: bump constructs from 10.5.0 to 10.5.1 (#20433)
  core: bump goauthentik/fips-python from `c272691` to `d973c46` in /lifecycle/container (#20437)
  core: bump goauthentik/fips-debian from `b0917af` to `4419749` in /lifecycle/container (#20438)
  web/admin/bugfix: Edit Stage not working. Invoking IdentificationStageForm not working (#20429)
  core: bump ruff from 0.15.1 to 0.15.2 (#20435)
  enterprise/providers/microsoft_entra: only check upn when set (#20441)
  core: bump selenium from 4.40.0 to 4.41.0 (#20436)
  website/docs: change permission name from 'Can view Admin interface' to 'Can access…' (#20412)
  website/integrations: add OIDC and update SAML instructions for Zammad (#20421)
  website/integrations: update wazuh acs url (#20401)
  web: Center footer links. (#20345)
  core: bump goauthentik.io/api/v3 to 3.2026.5.0-rc1-1771349690 (#20367)
  ci: bump tj-actions/changed-files from 47.0.3 to 47.0.4 (#20374)
  ci: bump helm/kind-action from 1.13.0 to 1.14.0 (#20375)
  core: bump library/golang from 1.25.5-trixie to 1.26.0-trixie in /lifecycle/container (#20381)
  core: bump goauthentik/fips-debian from `10dadf1` to `b0917af` in /lifecycle/container (#20382)
  ...
kensternberg-authentik added a commit that referenced this pull request Feb 23, 2026
* main: (30 commits)
  web/flow: generate a single API object for network transactions and use it for the lifetime of the FlowExecutor (#20030)
  web/flow: refactor flow executor so component selection is in an easy-to-maintain table (#19999)
  website/integrations: gatus: fix config block  (#20446)
  core: bump msgraph-sdk from 1.54.0 to 1.55.0 (#20432)
  core: bump aws-cdk-lib from 2.238.0 to 2.239.0 (#20434)
  core: bump constructs from 10.5.0 to 10.5.1 (#20433)
  core: bump goauthentik/fips-python from `c272691` to `d973c46` in /lifecycle/container (#20437)
  core: bump goauthentik/fips-debian from `b0917af` to `4419749` in /lifecycle/container (#20438)
  web/admin/bugfix: Edit Stage not working. Invoking IdentificationStageForm not working (#20429)
  core: bump ruff from 0.15.1 to 0.15.2 (#20435)
  enterprise/providers/microsoft_entra: only check upn when set (#20441)
  core: bump selenium from 4.40.0 to 4.41.0 (#20436)
  website/docs: change permission name from 'Can view Admin interface' to 'Can access…' (#20412)
  website/integrations: add OIDC and update SAML instructions for Zammad (#20421)
  website/integrations: update wazuh acs url (#20401)
  web: Center footer links. (#20345)
  core: bump goauthentik.io/api/v3 to 3.2026.5.0-rc1-1771349690 (#20367)
  ci: bump tj-actions/changed-files from 47.0.3 to 47.0.4 (#20374)
  ci: bump helm/kind-action from 1.13.0 to 1.14.0 (#20375)
  core: bump library/golang from 1.25.5-trixie to 1.26.0-trixie in /lifecycle/container (#20381)
  ...
kensternberg-authentik added a commit that referenced this pull request Feb 23, 2026
* main: (167 commits)
  enterprise: monkey patch pyjwt to accept mismatching key (#20402)
  enterprise/lifecycle: use datetime instead of date to track review cycles (#20283)
  root: run `npm i` with `npm@11.10.1` in all subdirectories (#20471)
  providers/oauth2: device code flow client id via auth header (#20457)
  core: bump goauthentik/fips-debian from `4419749` to `d6def0a` in /lifecycle/container (#20467)
  core: bump goauthentik/fips-python from `d973c46` to `bccefee` in /lifecycle/container (#20466)
  core, web: bump ajv from 6.12.6 to 6.14.0 in /packages/prettier-config (#20462)
  ci: bump and fix daily (#20461)
  website/integrations: fix Vaultwarden SSO_SCOPES syntax (#20459)
  stages/user_login: log correct user when session binding is broken (#20094)
  web/flow: generate a single API object for network transactions and use it for the lifetime of the FlowExecutor (#20030)
  web/flow: refactor flow executor so component selection is in an easy-to-maintain table (#19999)
  website/integrations: gatus: fix config block  (#20446)
  core: bump msgraph-sdk from 1.54.0 to 1.55.0 (#20432)
  core: bump aws-cdk-lib from 2.238.0 to 2.239.0 (#20434)
  core: bump constructs from 10.5.0 to 10.5.1 (#20433)
  core: bump goauthentik/fips-python from `c272691` to `d973c46` in /lifecycle/container (#20437)
  core: bump goauthentik/fips-debian from `b0917af` to `4419749` in /lifecycle/container (#20438)
  web/admin/bugfix: Edit Stage not working. Invoking IdentificationStageForm not working (#20429)
  core: bump ruff from 0.15.1 to 0.15.2 (#20435)
  ...
@gergosimonyi gergosimonyi added the backport/version-2026.2 Add this label to PRs to backport changes to version-2026.2 label Feb 24, 2026
authentik-automation bot pushed a commit that referenced this pull request Feb 24, 2026
This cherry-pick has conflicts that need manual resolution.

Original PR: #20429
Original commit: ab981de
@authentik-automation
Copy link
Contributor

⚠️ Cherry-pick to version-2026.2 has conflicts: #20512

gergosimonyi added a commit that referenced this pull request Feb 24, 2026
…eForm not working (cherry-pick #20429 to version-2026.2) (#20512)

* Cherry-pick #20429 to version-2026.2 (with conflicts)

This cherry-pick has conflicts that need manual resolution.

Original PR: #20429
Original commit: ab981de

* revert miscellaneous changes

These don't need to be in 2026.2

---------

Co-authored-by: Ken Sternberg <133134217+kensternberg-authentik@users.noreply.github.com>
Co-authored-by: Simonyi Gergő <gergo@goauthentik.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/version-2026.2 Add this label to PRs to backport changes to version-2026.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants