Skip to content

Commit

Permalink
Merge branch 'provider-github:main' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
iul1an authored Oct 24, 2024
2 parents c8585c3 + 8569ab9 commit 76fb828
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions internal/controller/team/team.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package team
import (
"context"
"reflect"
"strings"

"github.com/pkg/errors"
"k8s.io/apimachinery/pkg/types"
Expand Down Expand Up @@ -173,7 +174,8 @@ func getUserPermissionMapFromCr(users []v1alpha1.TeamMemberUser) map[string]stri
crMToPermission := make(map[string]string, len(users))

for _, user := range users {
crMToPermission[user.User] = user.Role
username := strings.ToLower(user.User)
crMToPermission[username] = user.Role
}

return crMToPermission
Expand All @@ -196,7 +198,8 @@ func getMembersWithPermissions(ctx context.Context, gh *ghclient.Client, org, sl
}

for _, m := range members {
mToPermission[*m.Login] = role
username := strings.ToLower(*m.Login)
mToPermission[username] = role
}

if resp.NextPage == 0 {
Expand Down

0 comments on commit 76fb828

Please sign in to comment.