From a045eb8371f2e90704cd680e1b6d0e9f488c08b9 Mon Sep 17 00:00:00 2001 From: Oscar Eriksson Date: Tue, 12 Nov 2024 18:42:39 +0100 Subject: [PATCH] Add all groups --- internal/pkg/services/auth/models.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/pkg/services/auth/models.go b/internal/pkg/services/auth/models.go index d5b2fea..6569821 100644 --- a/internal/pkg/services/auth/models.go +++ b/internal/pkg/services/auth/models.go @@ -95,7 +95,6 @@ func (superGroup AuthSuperGroup) ToGroups() model.Groups { Type: superGroup.Type, Aliases: []string{}, } - } memberGroupPostGroup.Members = append(memberGroupPostGroup.Members, memberEmail) memberGroupPostGroups[member.Post.EmailPrefix] = memberGroupPostGroup @@ -117,6 +116,9 @@ func (superGroup AuthSuperGroup) ToGroups() model.Groups { memberGroup.Members = append(memberGroup.Members, memberEmail) } outerGroup.Members = append(outerGroup.Members, memberGroup.Email) + for _, memberGroupPostGroup := range memberGroupPostGroups { + groups = append(groups, memberGroupPostGroup) + } groups = append(groups, memberGroup) } for _, postGroup := range superGroupPostGroups {