-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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.
gitlab-ce-ldap-sync/src/LdapSyncCommand.php
Lines 1913 to 1928 in fab2ace
$this->logger?->notice("Deleting extra group members..."); | |
foreach ($userGroupMembersSync["found"] as $gitlabUserId => $gitlabUserName) { | |
if (isset($membersOfThisGroup[$gitlabUserId]) && $membersOfThisGroup[$gitlabUserId] == $gitlabUserName) { | |
continue; | |
} | |
$this->logger?->info(sprintf("Deleting user #%d \"%s\" from group #%d \"%s\" [%s].", $gitlabUserId, $gitlabUserName, $gitlabGroupId, $gitlabGroupName, $gitlabGroupPath)); | |
$gitlabGroupMember = null; | |
/** @var GitlabGroupArray|null $gitlabUser */ | |
!$this->dryRun ? ($gitlabGroup = $gitlab->groups()->removeMember($gitlabGroupId, $gitlabUserId)) : $this->logger?->warning("Operation skipped due to dry run."); | |
$userGroupMembersSync["extra"][$gitlabUserId] = $gitlabUserName; | |
$this->gitlabApiCoolDown(); | |
} |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working