Skip to content

Commit

Permalink
GetGroup take IDP attribute into account in json driver
Browse files Browse the repository at this point in the history
  • Loading branch information
rhafer committed Feb 28, 2022
1 parent b3ee4ed commit f0d726e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/group/manager/json/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func New(m map[string]interface{}) (group.Manager, error) {

func (m *manager) GetGroup(ctx context.Context, gid *grouppb.GroupId) (*grouppb.Group, error) {
for _, g := range m.groups {
if g.Id.GetOpaqueId() == gid.OpaqueId || g.GroupName == gid.OpaqueId {
if (g.Id.GetOpaqueId() == gid.OpaqueId || g.GroupName == gid.OpaqueId) && (gid.Idp == "" || gid.Idp == g.Id.GetIdp()) {
return g, nil
}
}
Expand Down

0 comments on commit f0d726e

Please sign in to comment.