Change LDAP user's name with blocking updating name application settings
requested to merge 370779-ldap-user-sync-doesn-t-update-user-name-if-the-prevent-users-from-changing-their-profile into master
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
- Setup LDAP server in GDK: https://gitlab.com/gitlab-org/gitlab-development-kit/blob/main/doc/howto/ldap.md
- Login as John Doe.
- Logout and login as admin.
- Go to Admin > Settings > General > Account and Limit
- Enable
Prevent users from changing their profile name
and save. - In GDK, enter
gitlab-openldap
folder. - In the
frontend.example.com.ldif
file change line 36:cn: John Doe
tocn: test Doe
. - Run
make clean default
in the gitlab-openldap folder. - Open rails console.
- Run
LdapSyncWorker.new.perform
. - 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #370779 (closed)
Edited by Gosia Ksionek