1
0
mirror of https://github.com/keycloak/keycloak.git synced 2026-10-23 19:29:23 +03:00
Files
Mahathir Mohammad Shuvo e7689b41c7 Address cache policy fields by the shape held in the form (#52198)
The four cache policy detail fields were addressed with a fixed array index -
config.maxLifespan[0] and the three eviction fields. That holds on the LDAP and
Kerberos screens, which load with form.reset(component) and keep the raw
ComponentRepresentation, so the entry really is an array.

The custom provider screen loads with convertToFormValues, which unwraps a
single-element array, so the same entry is the plain string "50". react-hook-form
resolves config.maxLifespan[0] against that string as "5", and registering on an
index path writes that value back into form state. The truncation is therefore what
the next save sends, whether or not the user touched the field: a stored 50 persists
as ["5"], and an eviction time of 12:30 as 1:3.

Each field is now addressed by the shape actually present, the same way cachePolicy
already tolerated both through getValue. Only an array or a still-unset value takes
the index, so nothing changes for LDAP, for Kerberos or for a new provider, and the
path stays put when the number control replaces the string with a number.

Closes #52029

Signed-off-by: Mahathir Mohammad Shuvo <shuvo1728@gmail.com>
2026-10-23 14:08:22 +00:00
..