Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions core/group/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,16 @@
return s.repository.ListUserGroups(ctx, userId, roleId)
}

func (s Service) ListGroupRelations(ctx context.Context, objectId, subjectType, role string) ([]user.User, []Group, map[string][]string, map[string][]string, error) {

Check failure on line 137 in core/group/service.go

View workflow job for this annotation

GitHub Actions / golangci

unnecessary leading newline (whitespace)

if !uuid.IsValid(objectId) {
g, err := s.GetBySlug(ctx, objectId)
if err != nil {
return []user.User{}, []Group{}, map[string][]string{}, map[string][]string{}, fmt.Errorf("%w: %s", ErrListingGroupRelations, err.Error())
}
objectId = g.ID
}

relationList, err := s.repository.ListGroupRelations(ctx, objectId, subjectType, role)
if err != nil {
return []user.User{}, []Group{}, map[string][]string{}, map[string][]string{}, fmt.Errorf("%w: %s", ErrListingGroupRelations, err.Error())
Expand Down
Loading