Cursor Agent and Mateo Wang
8cf3bf11bd
fix(scim): preserve scim_active on PUT when client omits the field
...
A SCIM PUT may legally omit `active` (full-replace with the field
absent). Pydantic fills the SCIMUser.active default of True, so the PUT
handler was overwriting metadata.scim_active with True even when the
client never sent it — silently reactivating a previously SCIM-blocked
user and unblocking their keys.
Use model_fields_set to detect whether the client actually sent
`active`. If omitted, preserve the prior scim_active value and skip
the cascade to virtual keys.
Also drop comments added in this PR that just narrate what the code
does; keep only the docstrings and the SQL-NULL pitfall note that
explain non-obvious behaviour.
Co-authored-by: Mateo Wang <mateo-berri@users.noreply.github.com >
2026-05-02 04:15:25 +00:00
..
2026-05-01 17:38:40 -07:00
2026-04-17 13:02:59 -07:00
2026-04-23 15:31:16 -07:00
2026-05-01 20:29:19 -07:00
2026-05-01 12:11:32 -07:00
2026-05-01 10:10:07 -07:00
2026-04-29 13:57:35 -07:00
2026-04-17 13:02:59 -07:00
2026-04-30 16:43:42 -07:00
2026-05-01 15:54:10 -07:00
2026-05-01 14:11:51 -07:00
2026-05-01 17:36:12 -07:00
2026-04-17 13:02:59 -07:00
2026-05-02 04:15:25 +00:00
2026-04-29 12:29:20 +05:30
2026-04-25 19:03:43 -07:00
2026-04-17 16:53:21 -07:00
2026-04-17 17:36:40 -07:00
2026-04-30 17:06:37 -07:00
2026-04-17 13:02:59 -07:00
2026-04-17 13:02:59 -07:00
2026-04-17 21:32:09 -07:00
2026-02-18 16:58:38 -08:00
2026-04-23 15:31:16 -07:00
2026-04-17 13:02:59 -07:00
2026-04-29 18:53:12 +00:00
2026-04-25 08:50:26 -07:00
2026-04-30 17:28:02 -07:00
2026-04-17 13:02:59 -07:00
2026-04-23 15:31:16 -07:00
2026-04-17 13:02:59 -07:00
2026-03-18 00:54:23 +00:00
2026-04-17 13:02:59 -07:00
2026-02-28 21:32:57 +05:30
2026-03-03 17:29:39 -08:00
2026-04-17 13:02:59 -07:00
2026-04-29 22:48:03 +02:00
2026-05-01 00:09:51 -07:00
2026-04-29 12:34:14 -07:00
2026-04-11 22:24:04 +05:30
2026-04-17 13:02:59 -07:00
2026-04-17 13:02:59 -07:00
2026-04-17 13:02:59 -07:00
2026-04-17 13:02:59 -07:00
2026-05-01 11:55:36 +05:30
2026-04-17 13:02:59 -07:00
2026-04-17 12:49:31 +05:30
2026-04-30 14:27:19 -07:00
2026-05-01 14:24:53 -07:00
2026-05-01 17:25:38 -07:00
2026-04-17 13:02:59 -07:00
2026-02-26 12:43:39 +05:30
2026-04-17 13:02:59 -07:00
2026-04-17 13:02:59 -07:00
2026-04-17 13:02:59 -07:00
2026-04-17 13:02:59 -07:00
2026-04-17 13:02:59 -07:00
2026-04-27 11:06:56 -07:00
2026-05-01 14:32:18 -07:00
2026-04-17 13:02:59 -07:00
2026-04-17 13:02:59 -07:00
2026-04-17 13:02:59 -07:00
2026-04-28 19:15:03 +00:00
2026-04-17 13:02:59 -07:00
2026-04-17 13:02:59 -07:00
2026-05-01 08:06:10 +00:00
2026-04-17 13:02:59 -07:00
2026-04-11 18:58:04 +05:30
2026-04-17 13:02:59 -07:00
2026-04-24 08:36:25 -07:00
2026-04-17 13:02:59 -07:00
2026-04-17 13:02:59 -07:00
2026-04-14 23:37:49 +05:30