Adambean / gitlab-ce-ldap-sync

Synchronise users and groups (including group members) from an LDAP instance with Gitlab CE (and EE in free tier) self-hosted instance(s).
Apache License 2.0
61 stars 23 forks source link

Users from the "userNamesToIgnore" list removed from their groups #40

Open vigen-b opened 9 months ago

vigen-b commented 9 months ago

Hello and thanks for the helpful tool.

I'm not sure, but it seems to be a bug. When I add a user to the userNamesToIgnore list, he is removed from all groups. A little debugging shows that ignored users are not skipped in the deployGitlabUsersAndGroups method.

Particularly ignored users are not skipped in this snippet.

https://github.com/Adambean/gitlab-ce-ldap-sync/blob/fab2ace0071f12b95735baaa30bf141ce0226ff3/src/LdapSyncCommand.php#L1913-L1928

vigen-b commented 9 months ago

@Adambean I tried to fix the bug. Can you take a look at the PR #41?

Adambean commented 9 months ago

Thanks for submitting a PR :) I'll look into this shortly.