diff --git a/changelog/unreleased/filter-computing-groups-grappa.md b/changelog/unreleased/filter-computing-groups-grappa.md new file mode 100644 index 0000000000..3273ec700a --- /dev/null +++ b/changelog/unreleased/filter-computing-groups-grappa.md @@ -0,0 +1,3 @@ +Enhancement: Skip computing groups when fetching all groups from grappa + +https://github.com/cs3org/reva/pull/3719 \ No newline at end of file diff --git a/pkg/cbox/group/rest/rest.go b/pkg/cbox/group/rest/rest.go index 60dbac622b..f2501677f1 100644 --- a/pkg/cbox/group/rest/rest.go +++ b/pkg/cbox/group/rest/rest.go @@ -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) @@ -166,6 +166,11 @@ func (m *manager) fetchAllGroupAccounts() error { continue } + // filter computing groups + if is, ok := groupData["isComputingGroup"].(bool); ok && is { + continue + } + _, err = m.parseAndCacheGroup(ctx, groupData) if err != nil { continue