Skip to content

Change LDAP user's name with blocking updating name application settings

What does this MR do and why?

This MR provides a way to override application setting that blocks users from changing they name in the system. It adds it to the place where we update user with data from LDAP server during LDAP sync.

Without this fix, changing the name of user on LDAP side would not change it in GitLab.

How to set up and validate locally

  1. Setup LDAP server in GDK: https://gitlab.com/gitlab-org/gitlab-development-kit/blob/main/doc/howto/ldap.md
  2. Login as John Doe.
  3. Logout and login as admin.
  4. Go to Admin > Settings > General > Account and Limit
  5. Enable Prevent users from changing their profile name and save.
  6. In GDK, enter gitlab-openldap folder.
  7. In the frontend.example.com.ldif file change line 36: cn: John Doe to cn: test Doe.
  8. Run make clean default in the gitlab-openldap folder.
  9. Open rails console.
  10. Run LdapSyncWorker.new.perform.
  11. Check in Admin > Users section if the name of the "john" user was changed to test Doe.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #370779 (closed)

Edited by Gosia Ksionek

Merge request reports

Loading