mirror of
https://github.com/goauthentik/authentik
synced 2026-04-25 17:15:26 +02:00
web/admin/bugfix: Edit Stage not working. Invoking IdentificationStageForm not working (#20429)
* web/admin/bugfix: Edit Stage not working. Invoking IdentificationStageForm 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. * Forced update of package lock. AGAIN. * Sigh * Sigh. Again. * Sigh. But this time, with an empty cache. * Prettier and its opinions. * Clearing the cache broke relationships inside SFE. That has been updated. * WTF, over?
This commit is contained in:
651
package-lock.json
generated
651
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user