Skip to content

Commit

Permalink
skip computing groups
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgigi96 committed Mar 9, 2023
1 parent d47f096 commit cdc7b97
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion pkg/cbox/group/rest/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func (m *manager) fetchAllGroups() {

func (m *manager) fetchAllGroupAccounts() error {
ctx := context.Background()
url := fmt.Sprintf("%s/api/v1.0/Group?field=groupIdentifier&field=displayName&field=gid", m.conf.APIBaseURL)
url := fmt.Sprintf("%s/api/v1.0/Group?field=groupIdentifier&field=displayName&field=gid&field=isComputingGroup", m.conf.APIBaseURL)

for url != "" {
result, err := m.apiTokenManager.SendAPIGetRequest(ctx, url, false)
Expand All @@ -166,6 +166,12 @@ func (m *manager) fetchAllGroupAccounts() error {
continue
}

// filter computing groups
is, ok := groupData["isComputingGroup"].(bool)
if ok && is {
continue
}

_, err = m.parseAndCacheGroup(ctx, groupData)
if err != nil {
continue
Expand Down
2 changes: 1 addition & 1 deletion tests/ocis
Submodule ocis updated 550 files

0 comments on commit cdc7b97

Please sign in to comment.