Re-enabling public users left previously hidden users stuck missing
from non-admin candidate lists, for the same reason as the disable
direction: incremental sync never re-fetches already-acked rows.
ConfigUpdate is only emitted where system-config updates happen, the
api worker's HTTP controller. The handler was scoped to microservices
and so never actually ran.
Without this, devices that had already synced the full user list keep
those cached records until a manual logout, since the sync protocol
only upserts users and never prunes ones that quietly become invisible.
Sync v2's UserV1 feed sent every user unconditionally, bypassing the
publicUsers/admin check that the web REST endpoint already applies.
Non-admins now only sync themselves, partners, and album co-members
when public users are disabled.
Fixes#24528Fixes#30250
Addresses the first column of issue #28832: album.description now stores
and returns null instead of an empty string.
Co-authored-by: Giacomo Pinato <giacomo.pinato@gmail.com>
* fix(server): re-evaluate OIDC role claim on every login and support array values
Previously the OIDC role claim (immich_role) was only read at user
auto-registration time and only accepted as a scalar string, so admin
status never updated after the first login and array-valued role/group
claims (common with Keycloak, Entra ID, etc.) were silently ignored.
Now the role claim is normalized from either a string or an array of
strings, and existing users have their isAdmin flag synced from the
claim on every login, keeping the IdP as the source of truth for
privileges while leaving isAdmin untouched when the claim is blank.
* fix(server): use .includes() instead of .some() for role claim check
Satisfies unicorn/prefer-includes lint rule flagged by CI.
* fix(server): resolve missing role claim to standard user and fix test mock
Default the OIDC role claim to 'user' when the IdP omits it so
auto-registration doesn't crash, and add the missing getAdmin mock in the
auth.service test so it correctly simulates an existing admin rather than
the first-user-registration path.
* fix: claim sync logic
---------
Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>