fix(catalog-backend-module-gitlab): #20891 no self managed gitlab now gets all inherited users when consulting /groups/id/members

Signed-off-by: Juan Carlos Vargas V <jc.vargas.valencia@gmail.com>
This commit is contained in:
Juan Carlos Vargas V
2023-10-29 08:54:46 -05:00
committed by Juan Carlos Vargas V
parent 9c91930d25
commit 0873a43ac1
3 changed files with 7 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend-module-gitlab': patch
---
Resolved a bug affecting the retrieval of users from group members. By appending '/all' to the API call, we now include members from all inherited groups, as per Gitlab's API specifications. This change is reflected in the listSaaSUsers function.
@@ -92,7 +92,7 @@ export class GitLabClient {
options?: CommonListOptions,
): Promise<PagedResponse<GitLabUser>> {
return this.pagedRequest(
`/groups/${encodeURIComponent(groupPath)}/members`,
`/groups/${encodeURIComponent(groupPath)}/members/all`,
{
...options,
show_seat_info: true,
@@ -569,7 +569,7 @@ describe('GitlabOrgDiscoveryEntityProvider', () => {
),
),
rest.get(
`https://gitlab.com/api/v4/groups/group1/members`,
`https://gitlab.com/api/v4/groups/group1/members/all`,
(_req, res, ctx) => {
const response = [
{