Skip to content

Commit

Permalink
Fixed extra group memberships not being deleted.
Browse files Browse the repository at this point in the history
This was visible with error message "Group member #%d: User not found." due to a sanity check that shouldn't be here. (This in fact blocked knowledge of the extra membership being known.)

Fixes #2
  • Loading branch information
Adambean committed Mar 5, 2019
1 parent 4842e91 commit 306d233
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/LdapSyncCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -1406,11 +1406,6 @@ private function deployGitlabUsersAndGroups(array $config, string $gitlabInstanc
continue; // The Gitlab root user should never be updated from LDAP.
}

if (!isset($membersOfThisGroup[$gitlabUserId]) || $membersOfThisGroup[$gitlabUserId] != $gitlabUserName) {
$this->logger->error(sprintf("Group member #%d: User not found.", $n));
continue;
}

$this->logger->info(sprintf("Found Gitlab group member #%d \"%s\".", $gitlabUserId, $gitlabUserName));
if (isset($userGroupMembersSync["found"][$gitlabUserId]) || $this->in_array_i($gitlabUserName, $userGroupMembersSync["found"])) {
$this->logger->warning(sprintf("Duplicate Gitlab group member #%d \"%s\".", $gitlabUserId, $gitlabUserName));
Expand Down

0 comments on commit 306d233

Please sign in to comment.