Fix console error on Identity Management settings page #23038
BackDescription
Opening the Identity Management settings page in the Angular UI logged this error:
ERROR TypeError: Cannot read properties of undefined (reading 'requiredLength')
IdentitySettingsStore starts with settings = null, so store.password() is undefined on the first render. The identityPasswordPolicyForm computed in IdentityPasswordPolicyComponent read password.requiredLength without checking for that. The other settings tabs already hid their form in the template until it existed. The password policy tab did not.
Password policy tab
- The
identityPasswordPolicyFormcomputed now returnsundefineduntilstore.password()is defined. It builds the form only after that. identity-password-policy.component.htmlwraps the form in@if (identityPasswordPolicyForm(); ...), matching the sibling tabs. Most of the template diff is re-indentation from this wrapper.
Sibling tabs
- Added the same store-ready guard to the form computeds in the lockout, user profile and verification components. They no longer dereference
undefinedif they compute before settings load.
Preview config
- Added a root runner manifest,
volobox.app.yaml. It logs in with the ABP CLI, installsng-packsand runs theapp-proHttpApi.HostWithIdswith its DbMigrator against SQL Server and Redis containers. It needsAbpLicenseCode,AbpCliUserName,AbpCliPasswordas secrets. This file isn't part of the fix and can be dropped if we don't want it in the repo. - You need to set the abp branch to
rel-10.6
This is not a breaking change.
Checklist
- I fully tested it as developer / designer and created unit / integration tests
- I documented it (or no need to document or I will create a separate documentation issue)
- I've assigned reviewer, related labels and set a milestone for this PR
How to test it?
- You can use the preview mode that is linked to this PR
- Do not forget setting abp framework branch to 10.6 and the lepton branch to 5.6
- Go to Settings → Identity Management with the browser console open.
- Confirm no
TypeErroraboutrequiredLengthis logged. - Confirm the password policy, lockout, user and sign-in tabs render with their saved values once settings load.
- Change a password policy value, save, reload, and check that it persisted.
🤖 Opened from a Volobox coding session