@@ -136,6 +136,7 @@ const httpHandlers = [
|
||||
|
||||
// dynamic handlers
|
||||
|
||||
// https://docs.gitlab.com/ee/api/groups.html#list-group-details supports encoded path and id
|
||||
const httpGroupFindByEncodedPathDynamic = all_groups_response.flatMap(group => [
|
||||
// Handler for apiBaseUrl
|
||||
rest.get(`${apiBaseUrl}/groups/${group.full_path}`, (_, res, ctx) => {
|
||||
|
||||
@@ -166,6 +166,8 @@ export class GitLabClient {
|
||||
return this.pagedRequest(`/groups`, options);
|
||||
}
|
||||
|
||||
// https://docs.gitlab.com/ee/api/groups.html#list-group-details
|
||||
// id can either be group id or encoded full path
|
||||
async getGroupByPath(
|
||||
groupPath: string,
|
||||
options?: CommonListOptions,
|
||||
|
||||
+2
-2
@@ -366,7 +366,7 @@ export class GitlabOrgDiscoveryEntityProvider implements EntityProvider {
|
||||
if (this.gitLabClient.isSelfManaged() && this.config.restrictUsersToGroup) {
|
||||
groups = (await this.gitLabClient.listDescendantGroups(this.config.group))
|
||||
.items;
|
||||
groups.push(await this.gitLabClient.getGroupByPath(this.config.group));
|
||||
groups.push(await this.gitLabClient.getGroupByPath(this.config.group)); // adds the parent group for #26554
|
||||
users = paginated<GitLabUser>(
|
||||
options =>
|
||||
this.gitLabClient.listGroupMembers(this.config.group, options), // calls /groups/<groupId>/members
|
||||
@@ -397,7 +397,7 @@ export class GitlabOrgDiscoveryEntityProvider implements EntityProvider {
|
||||
groups = (await this.gitLabClient.listDescendantGroups(this.config.group))
|
||||
.items;
|
||||
|
||||
groups.push(await this.gitLabClient.getGroupByPath(this.config.group));
|
||||
groups.push(await this.gitLabClient.getGroupByPath(this.config.group)); // adds the parent group for #26554
|
||||
|
||||
const rootGroupSplit = this.config.group.split('/');
|
||||
const rootGroup = this.config.restrictUsersToGroup
|
||||
|
||||
Reference in New Issue
Block a user