Skip to content

Commit

Permalink
Fix group request to grappa (cs3org#3883)
Browse files Browse the repository at this point in the history
  • Loading branch information
javfg authored and gmgigi96 committed Jun 5, 2023
1 parent 43eec9a commit 26771af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/fix-group-get.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Fix group request to Grappa

The `url.JoinPath` call was returning an url-encoded string, turning `?` into
`%3`. This caused the request to return 404.

https://github.com/cs3org/reva/pull/3883
6 changes: 1 addition & 5 deletions pkg/cbox/group/rest/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ package rest
import (
"context"
"fmt"
"net/url"
"os"
"os/signal"
"strings"
Expand Down Expand Up @@ -277,10 +276,7 @@ func (m *manager) GetMembers(ctx context.Context, gid *grouppb.GroupId) ([]*user
return users, nil
}

url, err := url.JoinPath(m.conf.APIBaseURL, "/api/v1.0/Group", gid.OpaqueId, "/memberidentities/precomputed?limit=10&field=upn&field=primaryAccountEmail&field=displayName&field=uid&field=gid&field=type&field=source")
if err != nil {
return nil, err
}
url := fmt.Sprintf("%s/api/v1.0/Group/%s/memberidentities/precomputed?limit=10&field=upn&field=primaryAccountEmail&field=displayName&field=uid&field=gid&field=type&field=source", m.conf.APIBaseURL, gid.OpaqueId)

var r user.IdentitiesResponse
members := []*userpb.UserId{}
Expand Down

0 comments on commit 26771af

Please sign in to comment.