feat(users): add SCIMIdentities field to User type

Summary

Add the missing scim_identities field to the User struct to support SCIM identity information. This allows users to access SCIM identity data when retrieving user information from the GitLab API.

Changes

  • Added new SCIMIdentity struct with ExternUID and Active fields
  • Added SCIMIdentities []*SCIMIdentity field to the User struct (placed after Identities, matching API doc ordering)
  • Updated testdata/get_user_admin.json to include a sample SCIM identity
  • Added testdata/get_user_with_scim_identities.json dedicated test fixture
  • Added TestGetUserSCIMIdentities — verifies multiple SCIM identities (active and inactive) are correctly unmarshaled, and that regular Identities are unaffected
  • Added TestGetUserNoSCIMIdentities — verifies SCIMIdentities is nil (not an empty slice) when the field is absent from the API response
  • Updated TestGetUserAdmin to assert SCIMIdentities alongside the rest of the admin user fields

Motivation

Users need access to SCIM identity information to:

  • Track external UID changes (e.g., when interns or rehires change this value)
  • Generate reports on SCIM identity status
  • Avoid needing to create wrapper types around the User struct

Fixes #2259 (closed)


Note: This was previously submitted as a community fork MR (gitlab-community/gitlab-org/api/client-go!8 (closed)) which was closed in favour of filing directly against the upstream.

Merge request reports

Loading