restrictUsersToGroup should use the entire groupPath
Signed-off-by: Casper Thygesen <cth@trifork.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend-module-gitlab': patch
|
||||
---
|
||||
|
||||
restrictUsersToGroup should use the entire groupPath
|
||||
+3
-3
@@ -396,13 +396,13 @@ export class GitlabOrgDiscoveryEntityProvider implements EntityProvider {
|
||||
groups = (await this.gitLabClient.listDescendantGroups(this.config.group))
|
||||
.items;
|
||||
const rootGroupSplit = this.config.group.split('/');
|
||||
const rootGroup = this.config.restrictUsersToGroup
|
||||
? rootGroupSplit[rootGroupSplit.length - 1]
|
||||
const groupPath = this.config.restrictUsersToGroup
|
||||
? this.config.group
|
||||
: rootGroupSplit[0];
|
||||
users = paginated<GitLabUser>(
|
||||
options =>
|
||||
this.gitLabClient.listSaaSUsers(
|
||||
rootGroup,
|
||||
groupPath,
|
||||
options,
|
||||
this.config.includeUsersWithoutSeat,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user