User content mapping for LDAP users

Hi,

We’re running a self-hosted gitlab server with ldap backend.
User had a name change alice.doealice.smith for example ( it’s basically a new user in the LDAP backend ). So the new user has a different userid in the Gitlab mapping.

There’s a lot of activity, PR, comments, issues and whatnot mapped to the original user. And it would be a shame to lose this.

Can I update the mapping on all content for the previous user to the new one?

So, I’ve been able to solve this directly from the admin interface.

On new user:

  • Remove identity pointing to the “correct” LDAP identity.
  • Update username to alice.smith_old
  • Update the email to point to something other than whats in ldap

Old user:

  • Set identity to be what the new user previously had. cn=alice.doe,dc=example,dc=comcn=alice.smith,dc=example,dc=com for example.
  • update username to be alice.smith

Verify by logging in and see that all projects and activity shows up when using alice.smith as username.

1 Like