Skip to content

Commit 89abf0f

Browse files
committed
2 parents 0136c54 + 4974381 commit 89abf0f

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM mlocati/php-extension-installer:latest AS installer
2-
FROM php:7.4.9-cli-alpine3.12
2+
FROM php:8.1.33-cli-alpine3.21
33

44
COPY --from=installer /usr/bin/install-php-extensions /usr/bin/
55

src/LdapSyncCommand.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1355,7 +1355,16 @@ private function deployGitlabUsersAndGroups(array $config, string $gitlabInstanc
13551355
$this->logger?->notice("Finding all existing Gitlab users...");
13561356
$p = 0;
13571357

1358-
while (is_array($gitlabUsers = $gitlab->users()->all(["page" => ++$p, "per_page" => 100, "without_project_bots" => true])) && [] !== $gitlabUsers) {
1358+
while (is_array($gitlabUsers = $gitlab->users()->all([
1359+
"page" => ++$p,
1360+
"per_page" => 100,
1361+
/* Option not yet supported in the PHP GitLab API client component:
1362+
"without_project_bots" => true,
1363+
* See:
1364+
* - https://github.com/Adambean/gitlab-ce-ldap-sync/issues/50
1365+
* - https://github.com/GitLabPHP/Client/issues/810
1366+
*/
1367+
])) && [] !== $gitlabUsers) {
13591368
/** @var array<int, GitlabUserArray> $gitlabUsers */
13601369
foreach ($gitlabUsers as $i => $gitlabUser) {
13611370
$n = $i + 1;
@@ -1735,7 +1744,7 @@ private function deployGitlabUsersAndGroups(array $config, string $gitlabInstanc
17351744
continue;
17361745
}
17371746

1738-
if ($this->array_key_exists_i($gitlabGroupName, $ldapGroupsSafe)) {
1747+
if (!$this->array_key_exists_i($gitlabGroupName, $ldapGroupsSafe)) {
17391748
continue;
17401749
}
17411750
$ldapGroupMembers = $ldapGroupsSafe[$gitlabGroupName];

0 commit comments

Comments
 (0)