diff --git a/pkg/groups/service.go b/pkg/groups/service.go index 7d0088b2f..4ab6432b7 100644 --- a/pkg/groups/service.go +++ b/pkg/groups/service.go @@ -354,7 +354,7 @@ func (s *Service) AssignIdentities(ctx context.Context, ID string, identities .. for _, identity := range identities { // TODO @shipperizer swap user for identity if/when model changes - ids = append(ids, *ofga.NewTuple(fmt.Sprintf("user:%s", identity), MEMBER_RELATION, s.buildGroupMember(ctx, ID))) + ids = append(ids, *ofga.NewTuple(fmt.Sprintf("user:%s", identity), MEMBER_RELATION, fmt.Sprintf("group:%s", ID))) } err := s.ofga.WriteTuples(ctx, ids...) diff --git a/pkg/groups/service_test.go b/pkg/groups/service_test.go index bf772bcec..4411d5b8d 100644 --- a/pkg/groups/service_test.go +++ b/pkg/groups/service_test.go @@ -541,7 +541,7 @@ func TestServiceAssignIdentities(t *testing.T) { ids := make([]ofga.Tuple, 0) for _, i := range test.input.identities { - ids = append(ids, *ofga.NewTuple(fmt.Sprintf("user:%s", i), MEMBER_RELATION, fmt.Sprintf("group:%s#%s", test.input.group, MEMBER_RELATION))) + ids = append(ids, *ofga.NewTuple(fmt.Sprintf("user:%s", i), MEMBER_RELATION, fmt.Sprintf("group:%s", test.input.group))) } if !reflect.DeepEqual(ids, tuples) {